By Ginger Gibson

WASHINGTON (Reuters) - Bill Weld, the former Republican governor of Massachusetts, said on Friday he will challenge U.S. President Donald Trump for their party's presidential nomination in 2020, saying the country was in "grave peril."

Weld, 73, who has little name recognition and will have to raise vast sums of money for his campaign, is making a long-shot bid to deny Trump the Republican nomination. Opinion polls have consistently found Republican voters overwhelmingly support Trump's re-election.

Weld's announcement marks the first time a member of Trump's party has jumped in to officially challenge the president, who is seeking re-election after sweeping the Republican competition in 2016 to win the White House.

Other Republicans have publicly flirted with challenging Trump. They include former Ohio Governor John Kasich, who also ran for the party's presidential nomination in 2016, and former Senator Jeff Flake of Arizona, a frequent Trump critic recently said he would not run. Maryland Governor Larry Hogan has also been mentioned as a potential challenger to the president.

Weld, who ran for president in 2016 as a Libertarian, has been a consistent critic of Trump.

"It is time for all people of good will to take a stand and plant a flag," Weld said in a statement. "It's for this reason that I have today established an exploratory committee to pursue the possibility for my running for the presidency of the United States as a Republican in the 2020 election."

Weld made remarks on Friday in Bedford, New Hampshire. The state holds one of the earliest presidential nominating contests, making it a popular destination for candidates and potential aspirants.

The former governor criticized Trump for serving himself rather than the nation, for being too unstable to carry out his presidential duties, and for generating chaos.

"I think our country is in grave peril, and I cannot side any longer quietly on the sidelines," he said in his remarks, according to the Boston Globe.

Story continues

"We have a president whose priorities are skewed toward promotion of himself rather than toward the good of the country," Weld said, according to the Boston Herald.

"The situation is not yet hopeless but we do need a mid-course correction," he added, the Herald said.

Weld ran on the Libertarian Party's presidential ticket in 2016 before returning to the Republican Party this year.

He is a former prosecutor who led the New England state from 1991 to 1997, the Herald said.

(Writing by Susan Heavey; Editing by Meredith Mazzilli and Jonathan Oatis)