As I drive along the port at Montevideo in a government pickup on my way to interview Uruguay’s outgoing president, José Mujica, a striking sight catches my eye. It is an image that reflects how this most unusual of leaders will have transformed tiny Uruguay into one of the most progressive nations on Earth before he steps down after five years in office next March.

Arriving from Europe is a seemingly endless succession of gigantic grey metal tubes, over 30m long, encasing the long wind-turbine blades that will soon allow this country to meet some 30% of its energy needs from renewable sources.

“Be sure to ask Pepe about it,” says presidential communications officer Joaquín Costanzo from the front seat. “It’s one of his proudest achievements.”

Uruguay has such a small population, barely 3.4 million, that it feels normal that everyone calls the president Pepe, the informal, familiar version of José in Spanish. It fits well with his famous humility and dislike of wealth and ostentation. Having spent 13 years of his life languishing in the dungeons of Uruguay’s 1970s and 1980s dictatorship, undergoing torture and long stretches of solitary confinement, often in a hole in the ground, Mujica has had plenty of time to reflect on the futility of riches and the pointlessness of violence. At one point, he went mad, hearing voices, his agony increased by the bullet wounds he suffered during his capture.

But there is no trace of bitterness in the air as 18-year-old Manuela, Mujica’s famous three-legged dog, rushes out to greet visitors at the tiny farm where the president lives in Rincón del Cerro, 20 minutes outside Montevideo. The house has just three rooms. Mujica refuses to move to Uruguay’s luxurious presidential mansion. “I am rich here,” he says, bringing out two cushions that have seen better days to plonk them on two rusty garden chairs for the interview. His old black boots, laces untied, are muddy, and he is sockless in the balmy southern spring morning.

Mujica doesn’t dwell on his years in prison. “I don’t believe in the torture-meter, as if enduring that gives you a patina of prestige.” He dismisses with a shrug any hatred for his torturers. “If it hadn’t been them, it would have been somebody else. It’s inevitable. There are social classes that, if you meddle with them, all hell breaks loose. But hatred doesn’t make any sense. It’s a poison. You can’t spend life trying to collect debts no one is going to pay. That is not life. Life is tomorrow.”

This month though, Mujica could be forgiven for an uncharacteristic bout of nostalgia. Elected to office in 2009, he is the second successive president of the Frente Amplio (Broad Front), a coalition of left-wing parties that for the first time in Uruguay’s history broke the traditional alternation of the Blanco and Colorado (White and Red) parties in power when his Frente Amplio predecessor, Tabaré Vázquez, was elected in 2004. Constitutionally barred from running for a second consecutive term, he plans to remain a senator following the presidential elections of 30 November, when Vazquez is predicted to replace him. It has been a remarkable journey, from guerilla fighter to cult president.

When Mujica was arrested, back in 1972, he was a young member of the Tupamaro guerrilla group, sleeping with a machine gun under his bed. Now, he no longer sees any sense in that violence. “We were children of our time in a world that was different. But you can’t sacrifice life, which is almost a miracle, for the idea that in 30 years you will have a better world. Now we’re fighting for the same goals through other means. It’s worth going slowly, to persevere, and to seek changes to increase distribution and social justice, without falling into the path that leads to violence.”

Facebook Twitter Pinterest José Mujica in his Volkswagen beetle. Photograph: Natacha Pisarenko/AP

Rincón del Cerro could not be more modest. Old paint cans have been transformed into flower pots that don’t really grow flowers, just green shoots that look like weeds. Manuela, the black mongrel with her missing leg (“she had an accident when she was 10,” explains Mujica), is surely the most unpresidential dog on the planet. Against a line of bushes is the only garden bench, made of plastic bottle tops tied in a mesh. “It was made by the inmates of a prison psychiatric ward,” says the president. And that’s what it looks like.

But the frugal surroundings fade into the background when Mujica starts talking about the incredible economic transformation of Uruguay under his leadership.

“We’ve had positive years for equality. Ten years ago, about 39% of Uruguayans lived below the poverty line; we’ve brought that down to under 11% and we’ve reduced extreme poverty from 5% to only 0.5%,” he says with pride as Manuela sprawls at his feet on the sparse grass.

He has also increased investment from about 13% of GDP a decade ago to 25% now. And then there are the wind farms. “By 2016 we’ll be covering over 30% of our energy needs with renewable resources. We took advantage of the fact that Europe was in crisis, and that some projects couldn’t be carried out there any longer. We started getting offers for wind farms at prices that were really worthwhile.” Uruguay has been transformed into an energy-exporting nation, selling electricity to northern neighbour Brazil, which has almost 200 million more inhabitants.

In the same five years he has legalised abortion (elsewhere in Latin America, it is legal only in Cuba and Mexico City) and the sale of marijuana. “Nobody’s in favour of abortion, but it’s a reality: women need it,” he explains.

He’s equally candid about why he pushed through the legalisation of cannabis. “We’ve been repressing drugs for 80 years and it doesn’t work. Drug trafficking is much worse than the consumption of marijuana. And for those who don’t want to admit that, look at Mexico, look at Central America, look at Honduras, look at Guatemala, and you will see failed states, devoured from the inside by drug trafficking.”

He grows almost angry about those who still favour fighting the drug trade through prohibition. “The problem is that, alongside drug trafficking, giant systems have been built to fight it. The state has a number of pathologies, and one of them is that whoever is performing a task starts thinking that that task is the centre of the world. Everyone wants to look in the mirror and think that their job is socially essential,” he almost explodes. “Instead of repression, I need doctors to deal with this filth!”

How does Mujica get along with his fellow leaders, who do not share his frugal tastes? Does it create friction? “If majorities are supposed to decide in a democracy, as I see it rulers must tend to live like the majority of their people, not like the minority. When the presidency becomes a royal court, then I am offending the republican sense; I’m engaging in a feudal or monarchical contraband. Leave that for the wigs of monarchs.”

The only vehicle Mujica owns is an old, battered blue Volkswagen Beetle. The farm is owned by his wife, and he donates a large part of his presidential salary to charity.

“I slept for many years on a prison floor, and the nights I got a mattress, I was happy. I survived with barely nothing. So I started giving great importance to the small things in life and to the limits of things. If I dedicate myself to having a lot of things, I will have to spend a great part of my life taking care of them. And I won’t have time left to spend it on the things I like – in my case, politics.

“So living light is no sacrifice for me – it’s an affirmation of freedom, of having the greatest amount of time available for what motivates me. It’s the price of my individual freedom. I’m richer this way.”