(Reuters) - U.S. Representative Tulsi Gabbard, an Iraq War veteran who campaigned to end “forever wars,” dropped her long-shot bid for the 2020 Democratic presidential nomination on Thursday and endorsed front-runner Joe Biden in a video posted to Twitter.

“Although I may not agree with the vice president on every issue, I know that he has a good heart, and he’s motivated by his love for our country and the American people,” said Gabbard, 38. She has served as a congresswoman from Hawaii since 2013 and is the first Hindu elected to Congress.

The endorsement was something of a surprise given Gabbard’s past support for Biden’s main rival, U.S. Senator Bernie Sanders of Vermont. But she noted that recent state nominating contests had made it clear that Democratic voters had chosen the former vice president to take on Republican President Donald Trump in November’s general election.

On Twitter, Biden thanked Gabbard for her service to the country as a veteran and a congresswoman. “I’m grateful to have her support and look forward to working with her to restore honor and decency to the White House,” he wrote.

Despite remaining mired far behind Biden and Sanders, Gabbard had stayed in the race even as better-known rivals dropped out. In all nine state contests over the last two weeks, she finished behind other contenders who had already abandoned their campaigns but still appeared on ballots.

Gabbard earned her only two delegates by finishing second in American Samoa, where she was born. Biden has won at least 971 delegates of the 1,991 needed to clinch the nomination in July, while Sanders has collected 737, according to Edison Research - an advantage for Biden widely seen as virtually unassailable.

A major in the Hawaii National Guard who was deployed in Iraq from 2004 to 2005, Gabbard is a fierce opponent of what she calls “forever wars.” Despite her liberal views on most other issues, she has won praise from some Trump supporters and conservative media outlets, where she frequently appears as a commentator.

She has consistently opposed U.S. intervention in Syria, going so far as to meet secretly with Syrian President Bashar al-Assad in January 2017 during Democratic President Barack Obama’s administration, sparking fierce criticism from some in her own party.

She became embroiled in an ugly war of words in October after 2016 Democratic presidential candidate Hillary Clinton said Gabbard was being “groomed” to disrupt the 2020 election as a third-party candidate.

In January, Gabbard sued for defamation, seeking at least $50 million in damages from Clinton for harming her reputation by allegedly suggesting she was a Russian asset.