Clashes also broke out Saturday in Algeria, as opposition activists there tried to copy the tactics of their Tunisian neighbors, who forced their longtime leader to flee the country more than a week ago.
The protests in Yemen appeared to be the first of their kind. The nation's 23 million citizens have many grievances: they are the poorest people in the Arab world, the government is widely seen as corrupt and is reviled for its alliance with the United States in fighting al-Qaida, there are few political freedoms and the country is rapidly running out of water.
Still, calling for President Ali Abdullah Saleh to step down had been a red line that few dissenters dared to test.
In a reflection of the tight grip Saleh's government and its forces have in the capital — outside the city, that control thins dramatically — Saturday's demonstration did not take place in the streets, but was confined to the grounds of the University of Sanaa.
Around 2,500 students, activists and opposition groups gathered there and chanted slogans against the president, comparing him to Tunisia's ousted President Zine El Abidine Ben Ali, whose people were similarly enraged by economic woes and government corruption.
"Get out get out, Ali. Join your friend Ben Ali," the crowds chanted.
One of the organizers, Fouad Dahaba, said the demonstration was only a beginning and they will not stop until their demands are met.
"We will march the streets of Sanaa, to the heart of Sanaa and to the presidential palace. The coming days will witness an escalation," said Dahaba, an Islamist lawmaker and head of the teachers' union.
Making good on that pledge will be difficult. Like other entrenched regimes in the Arab world, Yemen's government shows little tolerance for dissent and the security forces — bolstered by U.S. military aid intended for fighting the country's virulent al-Qaida offshoot — are quick to crack down.
Police fired tear gas at the demonstrators, whose grievances include proposed constitutional changes that would allow the president to rule for a lifetime. Around 30 protesters were detained, a security official said. He spoke on condition of anonymity because he was not authorized to speak to the press.
Since the Tunisian turmoil, Saleh has ordered income taxes slashed in half and has instructed his government to control prices. He also ordered a heavy deployment of anti-riot police and soldiers to several key areas in the capital and its surroundings to prevent any riots.
Nearly half the population lives below the poverty line of $2 a day and doesn't have access to proper sanitation. Less than a tenth of the roads are paved. Tens of thousands have been displaced from their homes by conflict, flooding the cities.
The government is riddled with corruption, has little control outside the capital, and its main source of income — oil — could run dry in a decade.
Protests were also held in the southern port city of Aden, where calls for Saleh to step down were heard along with the more familiar slogans for southern secession. Police fired on demonstrators, injuring four, and detained 22 others in heavy clashes.
Military forces responded harshly to two similar protests a day earlier in four cities in the nearby southern province of Lahj, even firing mortar shells that killed one woman. The response forced residents to flee.
Besides the battle with al-Qaida's local franchise, which has taken root in the country's remote and lawless mountains, Yemen's government is also trying to suppress the secessionist movement and a separate on-and-off rebellion in the north.
Adding popular street unrest to that mix could present the government with a new challenge, though it has shown itself to be resilient even to the occasional al-Qaida attacks to penetrate the capital's defenses.
In Algeria, meanwhile, helmeted riot police armed with batons and shields clashed with rock- and chair-throwing protesters who tried to march in the capital in defiance of a ban on public gatherings.
At least 19 people were injured, the government said, but an opposition party official put the figure at more than 40.
Protest organizers at the democratic opposition party RCD draped a Tunisian flag next to the Algerian flag on a balcony of the party headquarters where the march was to begin in the capital, Algiers.
Riot police, backed by a helicopter and crowd-control trucks, ringed the exit to ensure marchers couldn't leave the building — and striking those who tried to come out to take part. Outside, some young men waved the national flag and chanted "Assassin Power!"
"I am a prisoner in the party's headquarters," said Said Sadi, a former presidential candidate who leads the Rally for Culture and Democracy party, said through a megaphone from a balcony window.
**Aomar Ouali contributed to this report from Algiers, Algeria.