A darling of the RFK foundation’s bailout effort was set to miss out on meeting former President Obama at its Manhattan gala Wednesday night — because he was busted during a traffic stop hours earlier.

Bail-reform poster child ­Pedro Hernandez, 19, was stopped while driving a BMW in The Bronx at about noon, cops said.

A computer check revealed the car’s plates were stolen and Hernandez’s driver’s license was suspended. He was charged with aggravated unlicensed operation of a motor vehicle and related charges, a law-enforcement source said.

It was at least the teen’s 13th arrest — and the third time he had been stopped for allegedly driving without a license in the past two years.

Hernandez was being held Wednesday night pending arraignment, said his lawyer, Alex Spiro.

That means he would miss the Robert F. Kennedy Human Rights organization’s annual Ripple of Hope Gala at the New York Hilton Midtown Wednesday night, where Obama was among the planned honorees and Hernandez was on the guest list, Spiro said.

“It is unfortunate and unfair that over a petty offense Pedro is forced to spend more time behind bars instead of attending the Kennedy event tonight, where he would have had the opportunity to spend time with President Obama,” the lawyer said.

Hernandez became a cause célèbre for critics of the criminal justice system when he refused to accept a no-jail plea bargain in a Bronx shooting on grounds that he was innocent.

He spent more than a year on Rikers Island before the RFK organization posted his $100,000 bail in July 2017.

“Our system is broken,” his lawyer insisted. “It is clear, given the history here, that Pedro is being targeted. And every time, he wins his freedom.”

Bronx District Attorney Darcel Clark dropped all charges in the shooting case against Hernandez in September 2017, saying one witness was no longer cooperating and initial information turned out to be “inconsistent and contradictory.”

In October, the DA’s office also offered to dismiss a second case against him, involving a 2015 armed robbery, on the condition that he enrolls in college in January and completes the semester.

Hernandez has filed two civil-rights suits against the city and several NYPD cops, including embattled Bronx Detective David Terrell.

One suit, filed in Bronx Supreme Court, has been inactive since August 2017, while the other, in Manhattan federal court, is awaiting a judge’s ruling on a motion by the city to have it dismissed.

In September, RFK Human Rights launched a controversial plan to bail out every woman and teen inmate on Rikers Island.

The initiative would have freed about 500 jailbirds, but the nonprofit abandoned it after two months with 105 inmates sprung.

The group nonetheless proclaimed it a success, saying only two of 90 people with scheduled court appearances had failed to show up.