Mesa addressed his countrymen late Monday, hours after riot police fired tear gas to scatter demonstrators trying to lay siege to the Government Palace.
"This is as far as I go," he told them. "I have decided to present my resignation as president of the republic."
It was his second offer to step down in three months. Mesa also submitted his resignation during similar protests in March, arguing the country was becoming ungovernable. Lawmakers rejected his offer, essentially giving him a new mandate.
This time, too, he suggested he might leave the matter up to the legislature. Mesa said he would "continue to be president until Congress makes a decision about the future of the country."
"In a nation that boasts more coups than years as an independent republic, President Carlos Mesa's resignation is not surprising and is more likely this time to be accepted by the Bolivian Congress," said CBS News Foreign Affairs Analyst Pamela Falk. "Unlike former Bolivian presidents who have fled in small boats across Lake Titicaca, President Mesa is attempting to leave the country with a clean slate, allowing the legislature to chose a president who is perceived to be more responsive to the nation's poor."
Earlier Monday, tens of thousands of demonstrators, including indigenous women in black bowler hats and farmers in baseball caps, snaked down into the capital from hilltop slums to stage the largest demonstration in La Paz in weeks.
Disgruntled miners created thunderous booms by tossing dynamite sticks, and more than 500 protesters were turned away by acrid tear gas as they tried to close in on Mesa's seat of power. No injuries were immediately reported, but police made 22 arrests, among them protesters accused of brandishing dynamite, according to state television Canal Siete.
The protest marked the fourth week of unrest in which protesters have also thrown up road blockades, strangling the capital and causing gas and food shortages in this impoverished Andean nation of 9 million people.
The crisis pits Indian and labor groups from the poorer eastern highlands, including La Paz and its poor satellite city of El Alto, against ruling blocks from Santa Cruz in the east and the oil-rich gas fields to the south that are pursuing greater autonomy.
The protests have steadily increased since Bolivia's Congress last month raised taxes on foreign oil companies that have descended on the country to develop its natural gas reserves — the second largest in South America after Venezuela.
Lawmakers had hoped to calm tensions in a country where anti-globalization anger runs high. But the tax increase touched off fresh demands for the nationalization of the oil industry and a new constitution giving more clout to Indians, who represent about half the population.
A historian turned politician, Mesa had no political sponsorship when he was thrust into the presidency in October 2003. He succeeded former President Gonzalo Sanchez de Lozada, who resigned after street protests over plans to export the country's natural gas reserves left at least 56 people dead.
Senate President Hormando Vaca Diez, who would be next in line to succeed Mesa, said he expected Mesa to stay on at least until Congress decides on a political transition. Vaca Diez said he was opening urgent consultations with all parties on when and where to call an emergency session of the legislature.
Many indigenous leaders have openly declared they would repudiate a Vaca Diez presidency, or even the next-in-line, House leader Mario Cossio, both from traditional parties.
One scenario, analysts said, included the possibility the third-in-line, the popular Supreme Court President Eduardo Rodriguez, could assume the presidency to then call early elections.