Brazilian President Jair Bolsonaro said Tuesday he was "ready for combat" after being discharged from hospital, where he spent the night after taking ill.

The former army captain, 67, maintained his previously scheduled agenda, traveling from Brasilia to the state of Mato Grosso do Sul in the central-west for an official ceremony.

"I just had a bad night," said the far-right president, who comes up for reelection in October.

"I'm ready for combat," he said in a video posted on Twitter by his communications minister, who had earlier announced Bolsonaro's release from hospital, saying the president was "doing very well."

The president's office did not respond to requests from AFP for details on the incident.

Newspaper Globo reported it was caused by "problems passing food from the stomach to the intestines."

Bolsonaro has had recurring health problems since being stabbed in the abdomen during his 2018 presidential campaign.

He was admitted to a military hospital on Monday night to undergo tests, missing a planned appearance at an event held by Brazil's Republican Party, which is allied with him.

It was the latest health scare for the president since September 2018, when an attacker stabbed then-candidate Bolsonaro in the abdomen at a campaign rally in the southeastern state of Minas Gerais.

Bolsonaro lost some 40 percent of his blood and underwent emergency surgery after the near-fatal attack, perpetrated by a man later declared mentally unfit to stand trial.

"The consequences of the attempted homicide... continue to cause my father health problems," tweeted Bolsonaro's son Senator Flavio Bolsonaro late Monday.

Brazilian President Jair Bolsonaro, pictured on March 25, 2022, was stabbed in the abdomen during the 2018 presidential campaign leaving him with lasting health problems
Brazilian President Jair Bolsonaro, pictured on March 25, 2022, was stabbed in the abdomen during the 2018 presidential campaign leaving him with lasting health problems AFP / EVARISTO SA

"But evil has never and will never win against good," he added, asking supporters to pray for the president.

Bolsonaro has undergone at least four surgeries since his stabbing, including the placement and subsequent removal of a colostomy bag, which made him prone to intestinal disorders.

He has also undergone other unrelated procedures during his presidency, including surgery to remove a bladder stone.

In January, Bolsonaro was hospitalized for two days in Sao Paulo with a partially blocked intestine. His doctor said the problem was a shrimp the president swallowed without chewing -- a diagnosis that delighted political cartoonists.

Bolsonaro, who took office in 2019, was also admitted to hospital for four days in mid-July with a similar condition, after experiencing a severe case of the hiccups that lasted for days.

Bolsonaro, a Covid-19 skeptic, also contracted the virus in July 2020, coming down with mild symptoms.

The president, who has often clashed with expert advice on containing the pandemic, is not vaccinated against Covid-19, and has joked the shot could "turn you into an alligator."

Bolsonaro currently trails in the polls heading into October's elections behind his likely rival, leftist ex-president Luiz Inacio Lula da Silva -- though the incumbent has closed the gap slightly in recent weeks.

His popularity has slumped as his government has struggled to contain the pandemic and revive a sputtering economy hit by high inflation.