FILE - In this Nov. 8, 2016 file photo, Libertarian vice presidential candidate, former Massachusetts Gov. Bill Weld arrives to cast his vote at the John F. Kennedy Elementary School in Canton, Mass. Weld confirmed Tuesday, Feb. 5, 2019, he has changed his party registration from Libertarian back to Republican as he mulls a possible primary challenge against President Donald Trump. (AP Photo/Michael Dwyer, File)
camera (The Associated Press) FILE - In this Nov. 8, 2016 file photo, Libertarian vice presidential candidate, former Massachusetts Gov. Bill Weld arrives to cast his vote at the John F. Kennedy Elementary School in Canton, Mass. Weld confirmed Tuesday, Feb. 5, 2019, he has changed his party registration from Libertarian back to Republican as he mulls a possible primary challenge against President Donald Trump. (AP Photo/Michael Dwyer, File)

Former Massachusetts Gov. William Weld has changed his party registration from Libertarian back to Republican as he mulls a possible primary challenge against President Donald Trump.

Weld served as a Republican governor from 1991 until 1997. He later became a Libertarian and ran for vice president on a ticket with former New Mexico Gov. Gary Johnson in the 2016 election.

The clerk's office in Canton, Massachusetts, confirms on Tuesday that Weld recently changed his party registration to the GOP.

If he runs for president as a Republican, he could be Trump's first challenger within the party.

Weld has not returned messages from The Associated Press. He recently told WMUR-TV in New Hampshire that he would discuss his potential political plans during a Feb. 15 visit to the first primary state.