Democratic presidential candidate Bernie Sanders Monday urged President Obama to grant clemency to an unrepentant convicted Puerto Rican terrorist who has been imprisoned in the U.S. for more than 34 years.

Sanders, who dropped the bombshell during a town hall in San Juan, P.R., said Oscar López Rivera, 73, deserves freedom.

“Oscar López Rivera is one of the longest-serving political prisoners in history — 34 years, longer than Nelson Mandela,” Sanders said to thunderous applause.

“We are talking about a Vietnam War veteran who was awarded a Bronze Star. I say to President Obama — let him out!”

Sanders promised that if Obama doesn’t release López Rivera, “I will pardon him” if elected president.

Sanders didn’t explain why López Rivera was imprisoned in the first place.

López Rivera was a founder of the FALN (Fuerza Armadas de Liberacion Nacional, Spanish for Armed Forces of National Liberation), which waged a violent campaign for Puerto Rican independence.

López Rivera was arrested in Chicago in May 1981 and was convicted of trying to overthrow the U.S. government, seditious conspiracy to destroy federal property, armed robbery, weapons violations and interstate transportation of stolen property.

He was sentenced to 55 years in prison.

FALN was deemed responsible for a reign of terror that killed six people and injured 130 others in at least 114 bombings.

They include the 1975 explosion at historic Fraunces Tavern in lower Manhattan, which left four people dead and wounded more than 50 others, and a New Year’s Eve 1982 bombing at police headquarters that maimed three NYPD cops who tried to defuse the explosives.

In August 1999, then-President Bill Clinton offered a controversial clemency deal to 12 FALN members if they agreed to renounce violence.

López Rivera rejected the offer primarily because it was not extended to all FALN prisoners.

Clinton’s pardons came at a time when Hillary Clinton was eyeing a run for the US Senate.

In a startling break with her husband, she denounced the early release, saying the FALN prisoners had not shown contrition for their acts of violence.

“When the administration first offered these prisoners clemency, I made it very clear that I had no involvement in or prior knowledge of the decision, as is entirely appropriate, and that the prisoners should not be released until they renounced violence,” Hillary Clinton said in 1999.

“It’s been three weeks, and their silence speaks volumes. I believe the offer of clemency should be withdrawn.”

The City Council — led by Speaker Melissa Mark Viverito — last year passed a resolution urging the release of López Rivera. The movement to pardon him has been a cause célèbre in the Puerto Rican community.

Hillary Clinton’s campaign had no immediate comment.