At a rally in Indianapolis on April 27, Republican presidential candidate Ted Cruz announced he was picking former rival Carly Fiorina as his running mate. Here are key moments from that event in three minutes. (Sarah Parnass/The Washington Post)

Ted Cruz just suffered one of the worst drubbings of his presidential campaign, losing badly in five states, falling further behind Donald Trump and watching his dim hopes of capturing the Republican nomination fade further.

Yet less than 24 hours later, the senator from Texas did something normally reserved for presumptive nominees rather than struggling underdogs: He announced a vice presidential running mate.

In choosing Carly Fiorina for that spot here Wednesday, Cruz reached for a political lifeline at a time when he is running out of them. Facing a must-win situation against Trump in next Tuesday’s Indiana primary, Cruz is trying one un­or­tho­dox maneuver after another in hopes of extending the race and forcing a contested Republican convention in Cleveland — his only hope for becoming the nominee.

The announcement was designed in part to sharpen the contrast with Trump that Cruz is trying to draw. Introducing Fiorina at an afternoon rally in downtown Indianapolis, Cruz highlighted the former Hewlett-Packard chief executive’s fierce exchanges with Trump and her refusal to back down from him when she was a candidate.

“One of the great principles of bullies — they feed off of fear,” Cruz said. “They feed off of people who will cower in the corner when they yell and scream and insult and holler and curse, and they don’t know what to do when a strong, powerful woman stands up and says, ‘I’m not afraid.’ ”

Ted Cruz announced that Carly Fiorina will be his running mate in his bid for the 2016 Republican nomination – but his introduction took almost half an hour. (Peter Stevenson/The Washington Post)

Cruz also emphasized the personal obstacles Fiorina has faced in her life, including battling cancer and losing her stepdaughter to addiction.

“She has faced challenges a lot worse than someone yelling, bellowing and insulting her face,” Cruz said, referring to the mogul’s insult of Fiorina’s appearance last year.

The senator also touted her qualifications for the vice presidency: “She is careful, she is measured, she is serious.”

When she took the stage with Cruz, Fiorina tethered Trump to Clinton, echoing Cruz’s argument that they hold similar views.

“Donald Trump has made his billions buying people like Hillary Clinton. They are not going to challenge the system,” she said.

Cruz said Fiorina has become close with his two young daughters and that they text her. Fiorina sang a brief song in her remarks, nodding to their warm relationship.

The rollout of the new partnership was carefully choreographed. Cruz teased a “major announcement” at a Wednesday morning stop at a local restaurant, and his top aides attended the event. At the rally, the Cruz campaign debuted new signs. On one side: “Cruz Fiorina ’16.” On the other: “Cruz Carly 2016.”

Trump was also in Indianapolis on Wednesday, rallying a much bigger crowd than Cruz’s with famous former Indiana University basketball coach Bobby Knight.

In a statement, Trump called Cruz’s decision to choose a running mate a “pure waste of time” and a “desperate attempt to save a failing campaign by an all-talk, no-action politician.”

Cruz’s announcement came as he hoped to gain ground in this state’s May 3 primary after being roundly defeated in Pennsylvania, Rhode Island, Delaware, Connecticut and Maryland. Trump stretched his overall lead in delegates to more than 400 over Cruz and upward of 800 over the third Republican in the race, Ohio Gov. John Kasich.

The senator acknowledged that rolling out a running mate now is unusual, but he argued that the entire presidential campaign has been unlike anything before it. He said picking Fiorina allows voters to know what they were getting and gives them “a clear choice.”

The Cruz-Fiorina team is unique in its gender and racial diversity. Cruz, who is Cuban American, would become the nation’s first Hispanic president, while Fiorina would become the first female vice president.

Fiorina’s favorability ratings tilted slightly negative overall in a Quinnipiac University poll from last December. Republicans saw her in a clearly favorable light, while Democrats were clearly negative and independents tilted slightly negative.

The former rival endorsed Cruz in March and has been one of his most active surrogates. Just weeks after endorsing Cruz, Fiorina joined the candidate’s wife, Heidi, on a busy retail tour of Wisconsin.

Days later, she traveled to Fargo, N.D., to help him win the state’s GOP convention, a job that required days of hands-on campaigning. It was a preview of the sort of work she might be expected to do as a running mate. Fiorina spent hours working the cash-bar hospitality suites where the activists who would elect delegates were being courted.

Fiorina’s California roots could be helpful to Cruz on June 7, when the Golden State awards its 172 delegates on the final day of primaries. She was the Republican nominee for U.S. Senate there in 2010, losing to Democratic Sen. Barbara Boxer.

In spite of her California ties, Fiorina does not bring deep connections to activists in that state or elsewhere, with her time in California politics mostly unmoored from the state’s GOP establishment. That makes her useful in terms of understanding the contours of a statewide campaign and television markets but hardly a rainmaker in terms of delegate accumulation.

Before he can think much about California, Cruz needs a win in Indiana. Looming over the race is the question of whether Gov. Mike Pence (R) will publicly back Trump, Cruz or no one. The governor met with both candidates last week.

“He may not endorse — I don’t think he’ll endorse anybody, actually — and he may endorse us, I don’t know,” Trump said on CNN on Wednesday morning. He added that he thinks Pence will either endorse him or no one.

Kasich has stopped actively campaigning in Indiana, clearing the way for Cruz to square off against Trump one on one. In exchange, Cruz is clearing the way for Kasich to face Trump in Oregon and New Mexico.

But the Cruz-Kasich deal has been unsteady, and it’s not clear whether it will have the intended effect of isolating and defeating Trump in those states.

In her remarks, Fiorina said the battle unfolding in Indiana and across the nation has a broad scope.

“This is a fight for the soul of our party and the future of our nation,” she said.

Jose A. DelReal in Indianapolis, David Weigel in Portland, Ore. and Robert Costa, Scott Clement and Katie Zezima in Washington contributed to this report.