WASHINGTON — They shared ideas and hugs as rivals on the campaign trail, so it’s hardly a surprise that former Housing Secretary Julián Castro is endorsing Sen. Elizabeth Warren’s presidential run now that he’s out of the race.

In a video released on Twitter on Monday, Castro said he’s throwing his weight behind Warren’s vision for big, structural change aimed at elevating the needs of working people over the wealthy.

“There’s one candidate I see who’s unafraid to fight like hell to make sure America’s promise will be there for everyone,” Castro says in the video narration, before turning to Warren for a staged conversation. “Nobody is working harder than you are.”

Castro isn't the first 2020 also-ran to endorse a former rival; Ohio Rep. Tim Ryan endorsed former Vice President Joe Biden after dropping out, and former Colorado Gov. John Hickenlooper endorsed his home state Sen. Michael Bennet, for instance.

But Castro’s endorsement matters because it could give Warren some momentum as her campaign slips in polling and fundraising and because it has the potential to bring Warren a base of support that is not elemental to her campaign — not to mention that it substantiates the possibility of a Warren-Castro ticket, if she wins the nomination.

Warren has lagged far behind her competitors like Biden and Vermont Sen. Bernie Sanders in support from the Latino community, the fastest growing electoral demographic in the country.

Castro’s endorsement also has the potential to help Warren in Castro’s home state of Texas, the Democratic primary’s third most delegate-rich state. Warren had been polling well in the Lone Star State into the early winter, but a more recent poll showed Biden running away with the state and Warren falling to third place behind Sanders.

Warren and Castro had worked together when the latter was a member of President Barack Obama’s Cabinet and the former was on the Senate committee dealing with housing, but the respect deepened as they discussed a similar vision for the country on the campaign trail.

Castro told VICE News in June that the first time they met was in 2000, when she came to San Antonio when he was mayor for an alumni event for Harvard, from which he graduated and where she used to teach.

A notable example was on the issue of immigration. After Castro brought the issue of decriminalizing border crossing to the fore last summer, Warren was quick to adopt his ideas.

In an MSNBC interview in May, Warren was asked which policy idea from a competitor she liked best.

“Oh, I think Julián Castro,” she said without missing a beat. “His idea around immigration and about changing how we treat people who come here and who are not documented. I think he’s got some really good ideas around this. I am very interested in his work. I admire it.”

The next month, Warren texted Castro to congratulate him on his Miami debate performance, though they appeared on the same stage. They took photos and mingled backstage at Rep. Jim Clyburn’s Fish Fry in Columbia, South Carolina, later that month. At the Polk County Steak Fry in Iowa in September, Castro crashed Warren’s selfie line for a cordial hug and photo.

When asked by VICE News about the buddy-buddy relationship after the Miami debate in June, Castro noted he does have a longstanding appreciation for Warren.

“I'm glad that we get along,” he said. “There's a certain camaraderie even in the competition that is great, and I hope that we maintain that.”

When asked at the time whether he’d consider serving in her administration, he answered, “I'm running so that I can have my own administration.”

Well, not anymore.