The world's two best players were substituted at halftime at Old Trafford, with Ronaldo rarely shining in a stadium he graced for six seasons with Manchester United.
Messi struck the post in the 11th minute. Earlier, the Barcelona superstar hinted in an interview with Argentina sports daily Ole that he might not stay with the club for his entire career.
Germany also struck late in a 1-0 away win, as Toni Kroos scored in the 89th against Spain though the past two world champions fielded far from full-strength lineups.
Brazil made it six straight wins since a humiliating end to its home World Cup. The winning goal came in the 83rd against Austria as newcomer Roberto Firmino's 25-meter shot sealed a 2-1 victory.
England beat Scotland 3-1 in Glasgow, where captain Wayne Rooney scored twice in a renewal of the oldest international fixture, dating back to 1872.
"We expected to win the game and we were the better team," said Rooney, who has now scored 46 international goals.
On a busy day of international friendlies worldwide, it was France 1, Sweden 0; Italy 1, Albania 0; Ireland 4, United States 1; and Japan 2, Australia 1 in a clash of 2015 Asian Cup favourites.
The main attraction was an anticipated Ronaldo-Messi duel which failed to deliver in a lacklustre game.
Guerreiro, a second-half substitute, met a right-wing cross from Ricardo Quaresma with a thumping header in the first of two minutes of stoppage time.
Germany ended Spain's run of 34 games without a loss at home despite having only three starters from the side that thrashed Brazil 7-1 in the World Cup semifinals.
Real Madrid midfielder Kroos unleashed a long-distance shot that skipped off the wet grass at Balaidos Stadium in Vigo and over substitute goalkeeper Kiko Casilla, marring his international debut.
For Brazil, Firmino's international career began last weekend and the Hoffenheim midfielder replaced Luiz Adriano in the second half to ensure Brazil got a fortunate win, firing a rising shot past Austria goalkeeper Ramazan Oeczan.
David Luiz appeared to foul an Austria defender before connecting with Oscar's corner to open the scoring in the 64th. Austria defender Aleksandar Dragovic levelled in the 75th from a penalty kick.
"We have to work on details," Dunga said through an interpreter. "This is the beginning and we can build on it next year."
On a cold, rainy night, Neymar was seldom a factor, and Dunga took off his captain in stoppage time, allowing him to symbolically hand over the armband to Thiago Silva. The former skipper had recently complained about the coach's choice of Neymar to lead the team.
France captain Raphael Varane, like his Real Madrid teammate Kroos, scored a late winning goal, heading in a corner from Antoine Griezmann in the 83rd minute against Sweden in Marseille. Another Madrid player, Karim Benzema, shot his penalty over the bar three minutes later.
Sweden was uninspired and had rested striker Zlatan Ibrahimovic.
Another 83rd-minute header, by Italy debutant Stefano Okaka, secured a 1-0 win against Albania in Genoa. The match was organized last month to aid the port city's recovery from devastating flooding.
Italian coach Fabio Capello saw his Russia team win for just the second time in nine matches, 2-1 against Hungary in Budapest.
Capello, whose multi-million dollar salary has been unpaid for six months, was assured Tuesday his job was safe by Russian sports minister Vitaly Mutko.
Jurgen Klinsmann's United States team is winless in four games after losing 4-1 against Ireland in Dublin.
The Americans dominated the first half, though needed Mix Diskerud's 39th goal to level Anthony Pilkington's seventh-minute opener. The Irish got two second half goals from Robbie Brady and a third from James McClean.
Mexico's five-match unbeaten run was ended by Belarus, which won 3-2 in Borisov despite Raul Jimenez twice putting the visitors ahead in the second half.Suggest a correction