DAKAR, Senegal – The Senegalese government said it had arrested a number of people and foiled an attempted coup just hours before thousands of anti-government protesters took to the streets Saturday, but opposition leaders said the accusations were aimed at undercutting the demonstrations.

Senegal’s president of more than a decade said the protests showed the maturity of the West African country’s democracy. President Abdoulaye Wade said he would be willing to meet with the opposition or hold a televised debate.

“In a democracy, the government governs and the opposition opposes. I don’t have to consult them … (but) with all that happened today, I am ready to receive them and listen to them,” Wade said.

Authorities said those arrested are accused of targeting various sites around Dakar. They did not say how many they were holding in the alleged plot.

“The state prosecutor decided to nip the coup plot in the bud by arresting those individuals identified as members of the plot,” Justice Minister Cheikh Tidiane Sy said.

Luc Sarr, special adviser of the Alliance for the Republic, a member of the lead opposition coalition, said the arrests were unacceptable.

“The government wanted to create pressure and a threat so that Senegalese wouldn’t come out and protest today,” Sarr said.

Popular frustration has been mounting in the moderate nation because of daily power cuts and rising costs. There is also growing discontent over the octogenarian president’s attempt to run for a third term next year, as well as the increasing influence of his son.