Riots have erupted again in Uganda after an opposition leader claimed he had been barred from returning to the country.

Kizza Besigye said he had been waiting to board a flight in Nairobi when a Kenya Airways official told him that the plane would not be allowed to land in Uganda with him on board. The news triggered renewed protests in Kampala which police quelled with teargas, a day after hundreds of people who tried to hold a banned rally were sprayed with pink liquid.

Another police clampdown is expected on Thursday for the inauguration of President Yoweri Museveni, who first came to power in Uganda in 1986. Guests at the ceremony will reportedly include the Zimbabwean president, Robert Mugabe, the Nigerian leader, Goodluck Jonathan, and Kenya's Mwai Kibaki. The inauguration's $1.3m (£781,000) cost has added to public anger at a time when living costs are rising fast.

Besigye had been receiving treatment in Kenya after he was targeted at close range with pepper spray and dragged from a vehicle following his most recent "walk to work" protest. He was booked on a flight Wednesday morning and was in the departure lounge when a member of ground staff told him that he could not fly. Besigye's luggage was retrieved from the hold and his boarding pass revoked.

The Ugandan government denied it had interfered. "The government of Uganda has nothing to do with Dr Besigye's travel plans from Kenya or any sovereign state," said a spokesman, Fred Opolot.

A spokesman for Kenya Airways said Besigye had not been allowed to board for "safety reasons".

Sam Mugumya, an aide to the opposition leader, suggested the government might have been anxious to prevent Besigye disrupting the inauguration. "It was very frustrating to find you are not allowed to walk, you are not allowed to drive, if you fly out for medical treatment you have to ask the president's permission to come back," he said. "This is the kind of dictatorship we are dealing with – it can do anything. It's a panicking regime that has lost its legitimacy to govern."

Besigye's lawyer, Daudi Mpanga, said the order against him flying had now been rescinded and that he was likely to return on Friday. Given that Thursday is a public holiday, Uganda's opposition plan to walk to a stadium and pray in what they are dubbing a "walk to pray" demonstration.

Museveni's government has been accused of trying to divert attention from the unrest by reviving a controversial anti-homosexuality bill that would strengthen laws to imprison gay people for life. First proposed in 2009, the legislation was due to be debated in parliament, but a walkout by female MPs over an unrelated bill prevented the debate.

MPs now appear set to hold an extraordinary session on Friday to debate the bill, which in its original form would impose the death penalty. If they run out of time, it could be reintroduced in the next parliamentary session.

The bill's author, David Bahati, has claimed a new version would not legislate for capital punishment, but no amended version has been released publicly.

Campaigners welcomed yesterday's temporary reprieve and called for the bill to be scrapped. Frank Mugisha, the director of Sexual Minorities Uganda, a gay rights group, told the Associated Press: "The way I saw, if the bill was debated today, it would have been passed because most MPs were in its favour. We were saved by the lack of quorum."

Christopher Senyonjo, a retired Anglican bishop from Uganda, said: "We wouldn't like this bill even to be debated. That will be dangerous because there is a lot of misinformation and excitement. Just with the bill being debated, anything can happen to LGBT people."

Gay activists say homophobia in Uganda has increased since the bill's introduction. Last year a tabloid newspaper published the names and photos of men it alleged were gay. One cover carried the words: "Hang Them."

The bill carries harsh provisions, extending colonial-era laws that condemn anyone convicted of a homosexual act to life imprisonment. Anyone who "aids, abets, counsels or procures another to engage of acts of homosexuality" would face seven years in prison. Landlords renting rooms or homes to homosexual people could get seven years.

Online petitions from the groups Avaaz and Allout said they had gathered more than 1.4m signatures decrying the proposals.