Social media footage also showed rioters storming the nearby Planalto presidential palace and Brazil's Supreme Court in what was quickly unfolding as a serious episode of political unrest.
The area around the parliament building in Brasilia had been cordoned off by authorities. But hundreds of Bolsonaro backers who refuse to accept leftist Lula's election victory broke through, marched up ramps and gathered on a roof of the modernist building, an AFP photographer witnessed.
In startling images uploaded to social media -- and reminiscent of the January 6, 2021 invasion of the US Capitol building by supporters of then-president Donald Trump, a Bolsonaro ally -- a tide of people stormed the national Congress, many waving Brazilian flags.
The building is where Brazil's Senate and Chamber of Deputies conducts its legislative business.
Protesters appeared on the iconic building's roof, but also on many of its adjoining lawns and open spaces, including that of the nearby Planalto palace.
Security forces used tear gas in an apparently failed effort to repel the demonstrators.
Bolsonaro, who was narrowly defeated by Lula in the second round of the presidential election on October 30, left Brazil at the end of the year and traveled to Florida, the US state where Trump now resides.