Ugandan police spokesman Fred Enanga said earlier that some suspects who had already been charged or detained over the killing sprees had accused the MPs of orchestrating the attacks "to cause fear in the population and cause people to hate the government".
In an address last month Museveni described those behind the killings as "pigs" and vowed that they would be defeated.
In Masaka, which lies southwest of the capital Kampala, residents demanded that the government take more action to stop the marauding killers.
Two prominent Ugandan opposition lawmakers were charged on Tuesday in connection with a wave of grisly murders by machete-wielding gangs, a move their lawyer branded "political persecution."
Villagers in the region of Masaka have been terrorised by thugs who police say have hacked to death up to 30, mainly elderly, people in their homes at night in just two months.
MPs Muhammad Ssegirinya and Allan Sewanyana were charged in the Masaka magistrates court with three counts of murder and one of attempted murder, their lawyer Elias Lukwago said.
"They denied all the charges... this is political persecution by Museveni's military regime," he added. "We condemn in strongest terms use of a skewed judicial process to meet political goals of a party in power."
Ugandan police spokesman Fred Enanga said earlier that some suspects who had already been charged or detained over the killing sprees had accused the MPs of orchestrating the attacks "to cause fear in the population and cause people to hate the government".
The two men belong to the opposition National Unity Platform (NUP) of popstar turned politician Bobi Wine -- who challenged Yoweri Museveni in a disputed election in January.
The lawyer said they were remanded in custody at the notorious Kitalya maximum security prison near Kampala until September 15.Â
Wine, whose real name is Robert Kyagulanyi, claimed the accusations were part of a plot by Museveni's government to vilify the opposition.
"When the president said recently (the) opposition was behind the killings we thought it was a bad joke. But when the police summoned our MPs, we knew the grand plan by (the) regime to implicate NUP leaders in the killings was being implemented," he said.
In an address last month Museveni described those behind the killings as "pigs" and vowed that they would be defeated.
'Fled for safety'Â
Museveni won a sixth term in the election that Wine, who came second to the veteran leader and has repeatedly been targeted by the authorities, says was rigged.
"No matter what Museveni's regime does, one day Uganda will be liberated and those framed for crimes because they are from the opposition will be freed," Wine said.
In Masaka, which lies southwest of the capital Kampala, residents demanded that the government take more action to stop the marauding killers.
"As we mourn our relatives who have been killed, we live in fear of being killed by the machete-wielding gangs," said Sarah Kasujja, 45, a small trader whose 81-year-old grandfather was among the victims.
"Some elderly people who have been living alone... have fled their homes for safety in towns," she told AFP.
"Government should take the blame for not defending us against the killers. The army and police have been deployed but they came too late."
The head of the Uganda National Council for Older Persons, Charles Isabirye, described the wave of murders as a "shock to the nation".
"For someone to kill old people who are living quiet lives in their homes is unbelievable," he said.Â
"We demand of government to ensure protection for the older people in the countryside and the people behind (the killings) should be identified and punished."