WASHINGTON (AP) — Mitt Romney clinched the Republican presidential nomination Tuesday with a win in the Texas primary, a triumph of endurance for a candidate who came up short four years ago and had to fight hard this year as voters flirted with a carousel of GOP rivals.

According to The Associated Press count, Romney surpassed the 1,144 delegates needed to win the nomination by winning at least 97 delegates in the Texas primary.

The former Massachusetts governor has reached the nomination milestone with a steady message of concern about the U.S. economy, a campaign organization that dwarfed those of his GOP foes and a fundraising operation second only to that of his Democratic opponent in the general election, President Barack Obama.

Romney would be the first Mormon nominated by a major party. His religion has been less of an issue than it was during his failed bid four years ago.

"We did it!" Romney proclaimed in a message to supporters, noting that "it's only the beginning."

"An honor and a privilege and a great responsibility," Romney told supporters at a fundraiser in Las Vegas. "And I know the road to 1,144 was long and hard, but I also know that the road to 11-06 — Nov. 6th — is also going to be long and it's going to be hard and it's going to be worth it because we're going to take back the White House and get America right again."

Romney must now fire up conservatives who still doubt him while persuading swing voters that he can do a better job fixing the nation's struggling economy than Obama. In Obama, he faces a well-funded candidate with a proven campaign team in an election that will be heavily influenced by the economy.

Romney's campaign went on the attack Tuesday, releasing a Web video citing the Obama administration's loan-guarantee investments in four renewable-energy firms that lost money and laid off workers.

The message — "President Obama is fundamentally hostile to job creators" — has been a theme of the Romney campaign since he launched his presidential bid. But sensing an opportunity to reach a new audience, the campaign planned to highlight Obama's support for the failed renewable energy company Solyndra, among other private ventures the Obama administration helped support.

"We need to have presidents who understand how this economy works," Romney told reporters Tuesday. "Sometimes I just don't think he understands what it takes to help people. I know he wants to help, but he doesn't know what he's got to do."

Romney's message and his big day, however, were somewhat overshadowed by real estate mogul Donald Trump and his discredited suggestions that Obama wasn't born in the United States.

Romney spent Tuesday evening at a Las Vegas fundraiser with Trump, who had toyed with the idea of running for president. Romney says he believes Obama was born in America but has yet to condemn Trump's repeated insinuations to the contrary.

"If Mitt Romney lacks the backbone to stand up to a charlatan like Donald Trump because he's so concerned about lining his campaign's pockets, what does that say about the kind of president he would be?" Obama's deputy campaign manager, Stephanie Cutter, said in a statement.

Both Trump and Romney steered clear of the issue at Tuesday's fundraiser. Asked Monday about Trump's contentions, Romney said: "I don't agree with all the people who support me. And my guess is they don't all agree with everything I believe in." He added: "But I need to get 50.1 percent or more. And I'm appreciative to have the help of a lot of good people."

Republicans won't officially nominate Romney until late August at the GOP national convention in Tampa, Fla. Romney has 1,183 convention delegates.

He won at least 97 delegates in Texas with 33 left to be decided. The 152 delegates in Texas are awarded in proportion to the statewide vote. The other delegates were sprinkled among several candidates.

Texas Republicans also voted in a Senate primary to choose a candidate to run for the seat being vacated by Sen. Kay Bailey Hutchison. Lt. Gov. David Dewhurst and state Solicitor General Ted Cruz were headed to a runoff in July.

With about three-fourths of precincts reporting, Dewhurst led with 45 percent of the vote compared to 33 percent for Cruz. Dewhurst, however, fell short of the majority he needed to avoid a runoff. The nominee will be strongly favored to win in November in heavily Republican Texas.

Romney, 65, is clinching the presidential nomination later in the calendar than any recent Republican candidate — but not quite as late as Obama in 2008. Obama clinched the Democratic nomination on June 3, 2008, at the end of an epic primary battle with Hillary Rodham Clinton. Four years ago, John McCain reached the threshold on March 4, after Romney had dropped out of the race about a month earlier.

This year's primary fight was extended by a back-loaded primary calendar, new GOP rules that generally awarded fewer delegates for winning a state and a Republican electorate that built up several other candidates before settling on Romney.

Rick Perry, Herman Cain, Newt Gingrich, Rick Santorum and Trump — all of them sat atop the Republican field at some point. Minnesota Rep. Michelle Bachmann peaked for a short time, too. But Romney outlasted them all, even as some GOP voters and tea party backers questioned his conservative credentials.

The primary race started in January with Santorum, the former Pennsylvania senator, narrowly edging Romney in the Iowa caucuses. Romney rebounded with a big win in New Hampshire before Gingrich, the former House speaker, won South Carolina.

Romney responded with a barrage of negative ads against Gingrich in Florida and got a much-needed 14-point win. Romney's opponents fought back: Gingrich called him a liar, and Santorum said Romney was "the worst Republican in the country" to run against Obama.

Gingrich and Santorum assailed Romney's work at Bain Capital, the private equity firm he co-founded, saying the firm sometimes made millions at the expense of workers and jobs. It is a line of attack that Obama has promised to carry all the way to November.

On Feb. 7 Santorum swept all three contests in Missouri, Colorado and Minnesota, raising questions about Romney's status as the front-runner. After a 17-day break in the voting, Romney responded with wins in Arizona, Michigan and Washington state before essentially locking up the nomination on March 6, this year's version of Super Tuesday.

Romney has been in general-election mode for weeks, raising money and focusing on Obama, largely ignoring the primaries since his competitors dropped out or stopped campaigning. Santorum suspended his campaign April 10, and Gingrich left the race a few weeks later.

Both initially offered tepid endorsements of Romney but Gingrich is now actively promoting Romney's campaign.

Texas Rep. Ron Paul said on May 14 he would no longer compete in primaries, though his supporters are still working to gain national delegates at state conventions.

Rich Galen, a Republican strategist who has been unaligned in the 2012 race, said the long, sometimes nasty primary fight should help Romney fine-tune his campaign organization so it can operate effectively in the general election. Galen doesn't, however, think it was relevant in toughening up Romney for the battle against Obama.

"Romney's been running for president for six years. He is as good a candidate as he's ever going to be," Galen said. "Whatever you say about him, he was better than everybody else in the race."

Copyright 2015 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.

Online Public Information File

Viewers with disabilities can get assistance accessing this station's FCC Public Inspection File by contacting the station with the information listed below. Questions or concerns relating to the accessibility of the FCC's online public file system should be directed to the FCC at 888-225-5322, 888-835-5322 (TTY), or fccinfo@fcc.gov.