Updated

President Yoweri Museveni derided Uganda's political opposition as divisive opportunists during his inauguration for a fourth elected term Thursday while also trying to soothe public anger over rising food and fuel prices that have triggered violent protests.

As Museveni was being sworn in, police sprayed tear gas at rock-throwing opposition supporters who massed on a major highway to welcome back Kizza Besigye, Uganda's leading opposition politician. That outpouring of support underscored the challenges Museveni faces from a man he has beaten three times at the ballot box but who has become a rallying point for public discontent.

Thousands of supporters lined the road to welcome Besigye, who was returning from Kenya where he had received medical treatment after a brutal arrest by security forces last month. The Ugandan police had fired tear gas or pepper spray at Besigye at point-blank range.

Police again fired tear gas Thursday, said Anne Mugisha, a top leader in Besigye's political party. She said police appeared to be trying to open the road, and that Besigye supporters later hurled stones at security forces. Besigye's drive along the 20-mile (35 kilometer) route from the airport into Kampala took several hours along a road line with security forces.

Police spokeswoman Judith Nabakooba said authorities wanted Besigye to use a different route but that he refused.

"They have inconvenienced many people, including those supposed to catch their flights," she said.

Besigye over the last month has been leading "walk to work" protests over the rising cost of food and fuel and government corruption. The marches have been the most serious unrest in sub-Saharan Africa since protests swept out leaders in Egypt and Tunisia.

Recognizing the discontent over rising prices, Museveni said in his inauguration speech that Uganda is looking to buy fuel in bulk and that the country would begin pumping its own oil within three years, reducing the need for imports.

"On the issue of food, predictions are showing that this is a temporary problem," Museveni said. "We are likely to have a bumper harvest. The prices will normalize. In the short run we are going to encourage micro-irrigation based on individual farms."

A 21-gun salute rang out before a crowd of thousands who watched the country's chief justice administer the oath at an old airstrip in Kampala that's now an open green space. Leaders from Kenya, Tanzania, Southern Sudan, Nigeria, Congo, Ethiopia and Zimbabwe attended.

Museveni appeared to refer to Besigye in his speech, saying that opponents want to cause chaos but that their "disruptive schemes" will be defeated. Museveni has repeatedly said he won't be ousted by protests.

He also sought to highlight the country's progress in the last 25 years, saying that 8 million primary students are in school today compared with 2.5 million in 1986. Museveni, who seized power in 1986 and is now in his 26th year in office, also promised to fight corruption.

Museveni also indulged in a moment of self-congratulations, saying: "I thank the Ugandans for overwhelmingly voting for me with 68.3 percent."

Although official returns showed Museveni winning that amount, Besigye says the results were falsified and that he and his rival both received a bit under 50 percent of the vote. Such an outcome would have required a run-off.

Uganda has seen sharp spikes in food and fuel prices the last several months, making car or bus travel unaffordable for many. Anger over the increases has fueled Besigye's protests, and security forces have clashed with protesters around the country. Human Rights Watch says government forces have shot and killed nine people during crackdowns on protests.

Museveni, an ex-rebel commander, once criticized African rulers who clung to power. In 2001 he promised to retire from politics but lifted a two-term limit on the presidency and instead ran again in 2006. In justifying his prolonged presidency, Museveni says he is fostering peace, stability and growth.

Besigye used to be Museveni's former personal physician, but broke away from the president over what he viewed as problems within government.

___

Straziuso contributed from Nairobi, Kenya.