BARACK Obama has urged members of the US Congress to show political courage over the future of his signature health care plan, even if it goes against their party’s positions.

The former president made his first public comments about the debate as he returned to the spotlight when he accepted the annual John F Kennedy Profile in Courage Award at JFK’s presidential library in Boston, Massachusetts.

The award is named after a 1957 Pulitzer Prize-winning book by Kennedy that profiled eight US senators who risked their careers by taking principled, though unpopular, positions.

In a 30-minute speech after accepting the award, Obama steered clear of partisan attacks and did not mention his successor, Donald Trump, who has often criticised the previous administration and has worked to undo many of Obama’s initiatives, including the Affordable Care Act (ACA).

However, he spoke of members of Congress who voted to pass the ACA during his presidency, only to lose their seat in later elections.

“They had a chance to insure millions,” he said. “But this vote could also cost them their seats, perhaps end their political careers.”

Obama made no direct reference to Thursday’s House of Representatives vote to dismantle much of the health care law, but noted that the debate over the issue was continuing. The House bill faces an uncertain future in the Senate, which is expected to write its own version of the legislation.

It is claimed the repealing of Obamacare would result in millions of people losing access to affordable health insurance and would allow insurers to hike prices for some individuals with pre-existing medical conditions.

Obama, whose appeal seemed to focus on wavering Republicans, said: “It is my fervent hope and the hope of millions ... such courage is still possible, that today’s members of Congress, regardless of party, are willing to look at the facts and speak the truth, even when it contradicts party positions.”

Arizona senator Jeff Flake, one of the few Republicans to attend the dinner, told reporters the Senate would write its own version of the legislation and he did not expect the House bill to survive intact. Obama focused much of his address on Kennedy’s legacy, as the library prepares to mark the 100th anniversary of his birth later this month.

Obama pointed out that the Kennedys – in particular, the late Senator Edward Kennedy – had long advocated for health care reform.

Among the guests who made their way down the red carpet into the library for the event were representatives of the Kennedy family, members of Congress, former Obama staffers and celebrities including former late-night talk show host David Letterman.

Former US vice-president Joe Biden and former secretary of state John Kerry also attended.

Congressman Joe Kennedy, a Massachusetts Democrat and JFK’s great-nephew, said Obama earned the award by meeting many challenges that faced him during his presidency.

Kennedy, a harsh critic of the Republican health overhaul plan, said: “It’s about understanding the challenges we face as a country and as a planet and mustering the political will to do what is right even if what is right at that moment isn’t necessarily popular.”

Caroline Kennedy, JFK’s daughter, who served as ambassador to Japan, and Jack Schlossberg, his only grandson, presented the award.

Schlossberg, 24, who is planning to attend Harvard Law School, said Obama inspired him the way an earlier generation was inspired by his grandfather.

“Without Barack Obama, I might still be sitting on my couch, eating Doritos and watching sports,” he said.

Obama had steered away from any involvement in US affairs during his early months out of office, although he forayed into the French political debate last week by posting a message of endorsement for centrist presidential candidate Emmanuel Macron, who defeated his far-right rival Marine Le Pen in Sunday’s election.

Obama was not the first former US president to receive the Profile in Courage award. Previous recipients include Republicans Gerald Ford and George HW Bush.

Obama will be in Italy today to give a keynote address on climate change and food security at the Seeds and Chips Global Food Innovation Summit in Milan.