The Brazilian presidential candidate for the Social Liberal Party, Jair Bolsonaro, gestures during the Brazilian Sugarcane Industry Association's Unica Forum 2018 in Sao Paulo, Brazil, on June 18, 2018. - Brazil holds general elections in October. (Photo by Miguel SCHINCARIOL / AFP)        (Photo credit should read MIGUEL SCHINCARIOL/AFP/Getty Images)
PHOTO: MIGUEL SCHINCARIOL/AFP/AFP/Getty Images
The Brazilian presidential candidate for the Social Liberal Party, Jair Bolsonaro, gestures during the Brazilian Sugarcane Industry Association's Unica Forum 2018 in Sao Paulo, Brazil, on June 18, 2018. - Brazil holds general elections in October. (Photo by Miguel SCHINCARIOL / AFP) (Photo credit should read MIGUEL SCHINCARIOL/AFP/Getty Images)
Now playing
01:00
Brazilian presidential candidate stabbed at event
BRASILIA, BRAZIL - AUGUST 29:  Suspended Brazilian President Dilma Rousseff testifies on the Senate floor during her impeachment trial on August 29, 2016 in Brasilia, Brasil. Senators will vote in the coming days whether to impeach and permanently remove Rousseff from office.. (Photo by Igo Estrela/Getty Images)
PHOTO: Igo Estrela/Getty Images South America/Getty Images
BRASILIA, BRAZIL - AUGUST 29: Suspended Brazilian President Dilma Rousseff testifies on the Senate floor during her impeachment trial on August 29, 2016 in Brasilia, Brasil. Senators will vote in the coming days whether to impeach and permanently remove Rousseff from office.. (Photo by Igo Estrela/Getty Images)
Now playing
03:58
Brazil's president removed from office
Brazilian President Dilma Rousseff attends the launching ceremony of a new stage of the state-subsidized housing program at Planalto Palace in Brasilia on May 6, 2016.
A special committee in Brazil's Senate was to vote Friday on whether to recommend starting an impeachment trial against President Dilma Rousseff who faces being suspended from office in less than a week. / AFP / EVARISTO SA        (Photo credit should read EVARISTO SA/AFP/Getty Images)
PHOTO: EVARISTO SA/AFP/AFP/Getty Images
Brazilian President Dilma Rousseff attends the launching ceremony of a new stage of the state-subsidized housing program at Planalto Palace in Brasilia on May 6, 2016. A special committee in Brazil's Senate was to vote Friday on whether to recommend starting an impeachment trial against President Dilma Rousseff who faces being suspended from office in less than a week. / AFP / EVARISTO SA (Photo credit should read EVARISTO SA/AFP/Getty Images)
Now playing
01:06
Why Brazil impeached President Rousseff
Brazil's suspended President Dilma Rousseff makes a statement at the Planalto Palace in Brasilia on May 12, 2016. Rousseff said Thursday that democracy and the constitution are at stake after she was forced to face an impeachment trial in the Senate and cede power to vice president Michel Temer.
PHOTO: EVARISTO SA/AFP/AFP/Getty Images
Brazil's suspended President Dilma Rousseff makes a statement at the Planalto Palace in Brasilia on May 12, 2016. Rousseff said Thursday that democracy and the constitution are at stake after she was forced to face an impeachment trial in the Senate and cede power to vice president Michel Temer.
Now playing
03:26
WIll Brazil's President be ousted from office?
brazil new president temer rousseff replacement darlington pkg_00011523.jpg
brazil new president temer rousseff replacement darlington pkg_00011523.jpg
Now playing
02:17
Brazil's vice president steps in as interim president
Brazilian President Dilma Rousseff speaks during a press conference at Planalto Palace in Brasilia on April 18, 2016.
President Rousseff said Monday that she is "outraged" by a vote in Congress to authorize impeachment proceedings against her and vowed to keep fighting. / AFP / EVARISTO SA        (Photo credit should read EVARISTO SA/AFP/Getty Images)
PHOTO: EVARISTO SA/AFP/AFP/Getty Images
Brazilian President Dilma Rousseff speaks during a press conference at Planalto Palace in Brasilia on April 18, 2016. President Rousseff said Monday that she is "outraged" by a vote in Congress to authorize impeachment proceedings against her and vowed to keep fighting. / AFP / EVARISTO SA (Photo credit should read EVARISTO SA/AFP/Getty Images)
Now playing
02:16
Brazilian President Rousseff vows to fight impeachment
Brazilian President Dilma Rousseff delivers a speech during the launching ceremony of the National Plan against Aedes aegypti and microcephaly in Brasília in March 23, 2016. The aedes aegypti mosquito is the vector of Zica virus. AFP PHOTO/ANDRESSA ANHOLETE / AFP / Andressa Anholete        (Photo credit should read ANDRESSA ANHOLETE/AFP/Getty Images)
PHOTO: ANDRESSA ANHOLETE/AFP/AFP/Getty Images
Brazilian President Dilma Rousseff delivers a speech during the launching ceremony of the National Plan against Aedes aegypti and microcephaly in Brasília in March 23, 2016. The aedes aegypti mosquito is the vector of Zica virus. AFP PHOTO/ANDRESSA ANHOLETE / AFP / Andressa Anholete (Photo credit should read ANDRESSA ANHOLETE/AFP/Getty Images)
Now playing
01:30
Brazil lawmakers vote to impeach president
Brazil recession_00003825.jpg
Brazil recession_00003825.jpg
Now playing
01:56
Feeling the pain of Brazil's recession
Frightened music goers watched as a stage collapsed at the Atmosphere Festival in Esteio, Brazil, on Sunday. The video shows strong winds and storm clouds before the scaffolding crumbled.
Xandi Medeiros heard about the collapse from his 16-year-old son who was at the festival.
"I was terrified when I saw the video. I could never have imagined that a tragedy like this could unfold ... where the DJ died and some people were injured..." he told CNN in Portuguese.
PHOTO: Xandi Medeiros/Facebook
Frightened music goers watched as a stage collapsed at the Atmosphere Festival in Esteio, Brazil, on Sunday. The video shows strong winds and storm clouds before the scaffolding crumbled. Xandi Medeiros heard about the collapse from his 16-year-old son who was at the festival. "I was terrified when I saw the video. I could never have imagined that a tragedy like this could unfold ... where the DJ died and some people were injured..." he told CNN in Portuguese.
Now playing
00:52
Concert stage collapses in high wind, DJ dies
PHOTO: Sao Paulo Fire
Now playing
00:54
Moment fire collapses building in Sao Paulo
Now playing
00:46
Child rescued after being buried alive
brazil recommends rousseff impeachment darlington lklv_00001301.jpg
brazil recommends rousseff impeachment darlington lklv_00001301.jpg
Now playing
01:41
Brazil committee recommends Rousseff's impeachment
brazil rio olympics superbacteria darlington pkg_00014129.jpg
brazil rio olympics superbacteria darlington pkg_00014129.jpg
Now playing
02:17
Super bacteria found on Rio beaches, Olympic venues
brazil olympics evictions darlington pkg_00000614.jpg
brazil olympics evictions darlington pkg_00000614.jpg
Now playing
02:09
Brazil clears residents ahead of Olympics
cnn exclusive michel temer intv darlington _00023305.jpg
cnn exclusive michel temer intv darlington _00023305.jpg
Now playing
03:53
CNN Exclusive: Brazilian VP Michel Temer speaks out
brazil rousseff impeach olympics lklv darlington _00003829.jpg
brazil rousseff impeach olympics lklv darlington _00003829.jpg
Now playing
01:31
Turmoil in Brazil may jeopardize the Olympic games
(CNN) —  

Brazilian President Jair Bolsonaro underwent successful surgery removing a colostomy bag he was fitted with after being stabbed four months ago, officials said Monday.

Spokesman Otavio do Rego Barros told reporters the surgery at Albert Einstein Hospital in Sao Paulo took about seven hours to complete. Barros said Bolsonaro did not need any blood transfusions and he was conscious and in stable condition in the intensive care unit.

A colostomy bag collects human waste while digestive organs recover from injury.

Bolsonaro is expected to stay in the hospital for 10 days, according to state media Agencia Brasil.

Jair Bolsonaro is carried away after being stabbed during a campaign rally in Juiz de Fora, Brazil.
PHOTO: Fernando Goncalves/AP
Jair Bolsonaro is carried away after being stabbed during a campaign rally in Juiz de Fora, Brazil.

The surgery comes after Bolsonaro was stabbed in September during the 2018 campaign. The incident took place as Bolsonaro was led through a crowd on the shoulders of supporters in Juiz de Fora, a city in the southern state of Minas Gerais. A video shows Bolsonaro grimacing in pain before being carried away.

Bolsonaro’s son Flavio Bolsonaro tweeted at the time that his father’s wounds “reached part of his liver, lung and intestine.” He said his father lost a lot of blood.

Police arrested Adelio Bispo de Oliveira, 40, who has been charged in connection with the attack, according to Agencia Brasil. The suspect’s Facebook page featured posts railing against Jair Bolsonaro, Agencia Brasil quoted police as saying.

The stabbing took the candidate off the campaign trail for weeks as he recovered. But it strengthened his position among Brazilians looking for a change.

Bolsonaro won the presidential election in October. He was declared the winner by the Supreme Electoral Tribunal after 94% of the votes were counted, defeating leftist ex-Sao Paulo Mayor Fernando Haddad.

While casting his ballot, Bolsonaro wore body army and arrived at a back entrance.

CNN’s Vasco Cotovio in London and Taylor Barnes in Atlanta contributed to this report.