Updated

President Trump and Vice President Pence quickly closed ranks Wednesday behind Alabama’s Roy Moore after he defeated their favored candidate in the state’s Senate primary runoff.

Moore, a conservative firebrand, defeated Trump-backed Sen. Luther Strange on Tuesday night in a race for the seat that Jeff Sessions held before becoming U.S. attorney general.

“Spoke to Roy Moore of Alabama last night for the first time,” Trump tweeted. "Sounds like a really great guy who ran a fantastic race. He will help to #MAGA!”

Pence tweeted: "Congratulations Roy Moore! We are thrilled you ran on the #MAGA (Make America Great Again) agenda & we are for you!”

Trump also called to congratulate Moore, who defeated Strange by 9 percentage points.

“I certainly support President Trump’s agenda,” Moore said Wednesday on “Fox & Friends.” “I think he will back me. I received a call from the president, and that’s what he said he’d do.”

Moore in his victory speech also made clear he’d work with Trump if he comes to Washington, despite the president backing his runoff opponent.

“Together we can make America great,” he said. “We can support the president. Don’t let anybody in the press think that because [the president] supported my opponent that I do not support him or his agenda.”

Strange, a former Alabama attorney general, was appointed to the seat in April. He was also backed by Senate Majority Leader Mitch McConnell, with expectation he would continue to support the agendas of Trump and the leaders of the GOP-controlled chamber.

Moore, a former Alabama chief justice, will face Democratic opponent Doug Jones, a former federal prosecutor, in December. A Democrat has not won an Alabama Senate seat in roughly the past 25 years, but Moore is still expected to face a strong challenge from Washington Democrats and their money.

“We’ll turn out our voters, and Roy Moore is going to be the next senator,” Republican National Committee Chairwoman Ronna McDaniel told “Fox & Friends” earlier Wednesday morning. “We're going to make sure Roy Moore is the next senator from Alabama.”

McDaniel, whose group gave roughly $30 million to the Strange campaign, said Trump and Moore coming together now is “critical.”

“You put your best foot forward and then you come together,” she said. “Our purpose unites us. And as Republicans, we know what we need to do for this country. And we need to support the president’s agenda.”

Trump and Pence went to Alabama in the closing days of the race to stump for Strange.

The runoff pitted Trump against former chief strategist Steve Bannon, former Alaska Gov. Sarah Palin and a slew of House conservatives who all backed Moore.

Strange, in his concession statement, thanked Trump and Pence for their support and vowed to "go back to work with President Trump and do all I can to advance his agenda over the next few weeks."

The Senate Leadership Fund, a group with ties to McConnell, R-Ky., spent an estimated $9 million trying to secure the nomination for Strange.

Moore, known in Alabama as the "Ten Commandments Judge," has a colorful political history that has both fueled and complicated his rise.

Moore first received national attention in the 1990s as a county judge when he hung a wooden Ten Commandments plaque on the wall of his courtroom. The ACLU filed a lawsuit against him.

Moore then ran and won a race for chief justice of the state’s Supreme Court in 2000. But he was ousted after refusing to remove a 5,280-pound granite Ten Commandments monument from the rotunda of the state judicial building.

Moore resurrected his political career in 2012, when he was elected chief justice again. But his second tenure was short-lived: in 2016, Moore was suspended as chief justice after he directed probate judges not to issue marriage certificates to gay couples.

Fox News' Samuel Chamberlain, Alex Pappas and Joseph Weber and The Associated Press contributed to this report.