Tens of thousands of protesters have taken to the streets of Brazil to show support to President Dilma Rousseff, who is facing calls for her impeachment.
Earlier, police used tear gas on anti-government protesters in Sao Paulo.
Several protests against Ms Rousseff erupted two days ago after she appointed her predecessor, Luiz Inacio Lula da Silva, as a minister.
Meanwhile, a Supreme Court judge has suspended his nomination as minister.
The decision is not final, and the government can appeal. In naming Lula, Ms Rousseff is accused of shielding him from charges of money-laundering, which he denies.
At the scene: Julia Carneiro, BBC News, Sao Paulo
Crowds gathered on Paulista Avenue carrying red flags defending the Workers' Party government and former President Lula - seen on one of many creative banners depicted as a strong, smiling body-builder.
The pro-government rallies in several Brazilian cities on Friday brought tens of thousands onto the streets in reaction to the growing movement to oust President Dilma Rousseff.
Just a few days ago, more than a million people gathered on the same avenue calling for Ms Rousseff's impeachment - with huge inflatable dolls of the president and Lula, her mentor, dressed as prisoners.
But when Lula appeared on the stage on Paulista, he was greeted with energetic chants and applause, and said he was going to help the government put the country back on track.
The rally turned into a street party soon after Lula left. But soon the mood was dampened by news that a Supreme Court judge had suspended his appointment as chief of staff.
Another twist in a week marked by unprecedented events - and heavy blows to Ms Rousseff, Lula and the Workers' Party he founded.
Lula, who remains a popular leader, addressed protesters early in the evening. Wearing a red shirt, he said: "There will not be a coup against Ms Rousseff."
He also said the opposition did not accept the results of the 2014 election, in which the president was re-elected for another four-year term.
"Democracy is the only way to allow people to participate in government's decisions," Lula told a cheering crowd.
Lula said he was joining Ms Rousseff's government to help the country and said Brazil, which is in its worst recession in decades, needed to resume growth.
Organisers said about 300,000 people demonstrated there, but the respected Datafolha institute put that number at 95,000.
Smaller rallies were also held in Rio de Janeiro, Brasilia and dozens of other cities.
Hours earlier, riot police dispersed anti-government protesters who had blocked the same central Sao Paulo thoroughfare since Wednesday evening, when demonstrations erupted against Lula's appointment as minister.
The nationwide rallies on Friday were the first time the government had massed the ranks of supporters since Lula was briefly arrested earlier this month.
They came after mass protests across Brazil on Sunday against corruption and calling for Ms Rousseff's departure. Estimates of the turnout range from one million to three million demonstrators.
Opponents who have called for the president's removal also accuse her of economic mismanagement and involvement in a sprawling corruption scandal in the state oil company Petrobras.
She denies wrongdoings, and has accused her rivals of mounting a "coup" against her.
Ms Rousseff insisted that she appointed Lula, who had started to make overtures to stand for president in 2018, to help her rebuild her political base in Congress and fight the impeachment proceedings.
However, Supreme Court judge Gilmar Mendes suspended Lula's nomination as chief of staff late on Friday, saying it was an intention to interfere in investigations.
Opponents had argued that Ms Rousseff's decision was unconstitutional and obstructed justice, as it was a move made to grant Lula immunity from money-laundering charges that he denies.
As a minister, any charges against him could only be dealt with by the Supreme Court, which operates more slowly, and not by the judge in the southern city of Curitiba who is overseeing Operation Car Wash into allegations of corruption at Petrobras.
Ms Rousseff and her supporters accuse judge Sergio Moro of political interference.
Meanwhile, an impeachment committee in the lower house of Congress held its first session Friday and said it expected to reach a decision within a month on whether to recommend removing Ms Rousseff.
The process is over allegations that Ms Rousseff broke the law managing the federal budget in 2014, when she was running for re-election.