Visitors reach Mr. Mujica’s austere dwelling after driving down O’Higgins Road, past groves of lemon trees. His net worth upon taking office in 2010 amounted to about $1,800 — the value of the 1987 Volkswagen Beetle parked in his garage. He never wears a tie and donates about 90 percent of his salary, largely to a program for expanding housing for the poor.

His current brand of low-key radicalism — a marked shift from his days wielding weapons in an effort to overthrow the government — exemplifies Uruguay’s emergence as arguably Latin America’s most socially liberal country.

Under Mr. Mujica, who took office in 2010, Uruguay has drawn attention for seeking to legalize marijuana and same-sex marriage, while also enacting one of the region’s most sweeping abortion rights laws and sharply boosting the use of renewable energy sources like wind and biomass.

As illness drives President Hugo Chávez of Venezuela from the political stage, suddenly leaving the continent without the larger-than-life figure who has held such sway on the left, Mr. Mujica’s practiced asceticism is a study in contrasts. For democracy to function properly, he argues, elected leaders should be taken down a notch.

“We have done everything possible to make the presidency less venerated,” Mr. Mujica said in an interview one recent morning, after preparing a serving in his kitchen of mate, the herbal drink offered in a hollowed calabash gourd and commonly shared in dozens of sips through the same metal straw.

Passing around the gourd, he acknowledged that his laid-back presidential lifestyle might seem unusual. Still, he said it amounted to a conscious choice to forgo the trappings of power and wealth. Quoting the Roman court-philosopher Seneca, Mr. Mujica said, “It is not the man who has too little, but the man who craves more, who is poor.”

THE leader at the helm of Uruguay’s changes, known to his many detractors and supporters alike as Pepe, is someone few thought could ever rise to such a position. Before Mr. Mujica became a gardener of chrysanthemums, he was a leader of the Tupamaros, the urban guerrilla group that drew inspiration from the Cuban revolution, carrying out armed bank robberies and kidnappings on Montevideo’s streets.

In their war against the Uruguayan state, the Tupamaros gained notoriety through violence. The filmmaker Constantin Costa-Gavras drew inspiration for his 1972 movie, “State of Siege,” from their abduction and execution in 1970 of Daniel Mitrione, an American adviser to Uruguay’s security forces. Mr. Mujica has said that the group “tried by all means to avoid killings,” but he has also euphemistically acknowledged its “military deviations.”

A brutal counterinsurgency subdued the Tupamaros, and the police captured Mr. Mujica in 1972. He spent 14 years in prison, including more than a decade in solitary confinement, often in a hole in the ground. During that time, he would go more than a year without bathing, and his companions, he said, were a tiny frog and rats with whom he shared crumbs of bread.

Some of the other Tupamaros who were placed for years in solitary confinement failed to grasp the benefits of befriending rodents. One of them, Henry Engler, a medical student, underwent a severe mental breakdown before his release in 1985.

Mr. Mujica rarely speaks about his time in prison. Seated at a table in his garden, sipping his mate, he said it gave him time to reflect. “I learned that one can always start again,” he said.

He chose to start again by entering politics. Elected as a legislator, he shocked the parking attendants at Parliament by arriving on a Vespa. After the rise to power in 2004 of the Broad Front, a coalition of leftist parties and more centrist social democrats, he was named minister of Livestock, Agriculture and Fisheries.

Before Mr. Mujica won the 2009 election by a wide margin, his opponent, Luis Alberto Lacalle, disparaged his small house here as a “cave.” After that, Mr. Mujica also upset some in Uruguay’s political establishment by selling off a presidential residence in a seaside resort city, calling the property “useless.”

His donations leave him with roughly $800 a month of his salary. He said he and his wife, Lucía Topolansky, a former guerrilla who was also imprisoned and is now a senator, do not need much to live on. In a new declaration in 2012, Mr. Mujica said he was sharing ownership of assets previously in his wife’s name, including their home and farm equipment, which lifted his net worth.

He pointed out that his Broad Front predecessor as president, Tabaré Vázquez, also stayed in his own home (though Mr. Vázquez, an oncologist, lives in the well-heeled district of El Prado), and that José Batlle y Ordóñez, a president in the early 20th century who created Uruguay’s welfare state, helped forge a tradition in which there is “no distance between the president and any neighbor.”

INDEED, if there is any country in South America where a president can drive a Beetle and get by without a large entourage of bodyguards, it might be Uruguay, which consistently ranks among the region’s least corrupt and least unequal nations. While crime is emerging as more of a concern, Uruguay remains a contender for the region’s safest country.

Still, Mr. Mujica’s governing style does not sit well with everyone. The proposal to legalize marijuana, in particular, has incited a fierce debate, with polls showing most Uruguayans opposed to the measure. In December, Mr. Mujica asked legislators to postpone voting to regulate the marijuana market, though he is pushing for the bill to be discussed again soon.

“It’s a shame to have a president like this man,” said Luz Díaz, 78, a retired maid who lives near Mr. Mujica and voted for him in 2009. She said she would not do so again if given the choice. “This marijuana thing, it’s absurd,” she added. “Pepe should return to selling flowers.”

Polls show that his approval ratings have been declining, but “I don’t give a damn,” insisted Mr. Mujica, emphasizing that he considered re-election to consecutive terms, already prohibited by Uruguay’s Constitution, as “monarchic.” “If I worried about pollsters, I wouldn’t be president,” he said.

With two years remaining in his term, Mr. Mujica seems to cherish the freedom to speak his mind. About his religious beliefs, he said he was still searching for God.

He laments that so many societies considered economic growth a priority, calling this “a problem for our civilization” because of the demands on the planet’s resources. (Interestingly enough, Uruguay’s economy is still expanding comfortably at an estimated annual rate of 3.6 percent.)

When the gourd of mate was empty, Mr. Mujica disappeared into his kitchen and returned with an impish grin and a bottle of Espinillar, a Uruguayan tipple distilled from sugarcane. It was not yet noon, but glasses were filled and toasts were pronounced.

After that, the president jumped around subjects, from anthropology and cycling to Uruguayans’ love for beef. He said he could not dream of retiring, but looked forward to his post-presidency, when he hopes to farm full time again.

Finally, Mr. Mujica’s eyes lit up as he remembered a passage from “Don Quixote,” in which the knight-errant imbibes wine from a horn and dines on salted goat with his goatherd hosts, delivering a harangue against the “pestilence of gallantry.”

“The goatherds were the poorest people of Spain,” said Mr. Mujica. “Probably,” he added, “they were the richest.”