LOS ANGELES — Steve Alford was hired as UCLA basketball coach on Saturday, spurning New Mexico days after he agreed to a new 10-year deal with the Lobos for a chance to run what he called “the premier basketball program in the country.”

The Bruins are bringing in someone who shares the same Indiana roots as John Wooden, who led UCLA to a record 10 national championships, including seven in a row, before retiring in 1975. Alford learned about Wooden as a first-grader in Martinsville, Ind., where his father, Sam, coached the high school basketball team at Wooden’s alma mater.

“Ever since then there was a draw to find out more about him,” Alford said on a teleconference. “I know my first steps into Pauley I will really feel that.”

Alford agreed to a seven-year deal worth $18.2 million, with a yearly salary of $2.6 million and a $200,000 signing bonus, according to UCLA athletic director Dan Guerrero.

Alford will be introduced in Westwood on Tuesday.

“This is truly a leap of faith,” he said.

Guerrero said UCLA reached out to Alford first, not knowing whether he would be interested in the Bruins. Once he confirmed he was, the details were finalized early Saturday, Guerrero said.

“It was not an easy decision because I was extremely happy,” Alford said. “I was about as happy as I can be.

“When I kept thinking about things, it still came back to UCLA. You’re talking about the premier basketball program in the country. To have an opportunity like this, they don’t come around every day.”

Guerrero said Alford is “the perfect fit for UCLA” because he connects with a new generation of players and brings an up-tempo and team-oriented style of play to Westwood.

“He’s ready for this stage,” Guerrero said.

Alford’s deal with New Mexico, scheduled to take effect on April 1, was worth more than $20 million over 10 years.

Guerrero said Alford is responsible for a buyout of his agreement in Albuquerque, but that UCLA would work out the details. Both Alford and New Mexico athletic director Paul Krebs said they didn’t know how much the buyout was worth.

Alford, who is 48, succeeds Ben Howland, who was fired last weekend after 10 years and a 233-107 record that included three consecutive Final Four appearances and four Pac-12 titles. The Bruins were 25-10 this season, which ended with a 20-point loss to Minnesota in the second round of the NCAA tournament.

Alford led New Mexico to a 29-6 record this season that included the Mountain West regular-season and tournament titles. But the Lobos were upset by Harvard in the second round of the NCAAs shortly after Alford’s new contract had been announced.

Alford had a 155-52 record in six years at New Mexico, with the Lobos making three trips to the NCAA tournament. He was selected Mountain West coach of the year three times.

“I’m about building programs, not teams, not seasons,” Alford said. “UCLA doesn’t just want one winning season, UCLA wants a basketball program that is going to breed consistent excellence.

“I’ve always tried to do things with excellence. When you think of UCLA in every regard, you see the word excellence.”

Expectations have always been high in Westwood since Wooden’s era. The Bruins own a record 11 national championships, but have won just one — in 1995 under Jim Harrick — since Wooden retired.

“Nobody understands pressure any more than I do. I’ve been under pressure since I was 16,” said Alford, whose high school gym in New Castle, Ind., seats 10,000 and frequently sold out when he was there. “You’re not going to find anybody more competitive than I am.”

Guerrero said, “He’s not the kind of guy that will shy away from what UCLA basketball is all about.”

The Lobos didn’t just lose Alford, they also won’t have his son, Bryce, on their roster next season. Alford said his highly touted son would follow him to Westwood, continuing a tradition that Alford first established when he played under his father at New Castle Chrysler High.

Krebs said it was clear when he talked to Alford on Saturday morning that his mind was made up, and although he’s disappointed, he said he respected the decision.

Krebs said it was like a “bomb dropped in the room” when Alford told his players he was leaving.

“This is a very emotional time,” Krebs said. “There is no good way to break the news to the young men in the program. ... There’s a lot of raw emotion right now.”

Alford said, “That’s not easy to look those young men in the face, but I think they understand. The reason they understand is it’s UCLA. If it was anywhere else, this is not a decision that would have been made.”

Guerrero had said he wanted a coach who would help boost season ticket sales. The Bruins had just a few sellouts at newly renovated Pauley Pavilion this season.

“I think the UCLA family will embrace him. I think he’ll be able to hit on all cylinders,” Guerrero said. “He’ll be able to energize the fan base in so many ways. Look at New Mexico, they get 15,000 a game. It’s madness there.”

Alford is known for his up-tempo coaching style, which should suit Bruins fans turned off by Howland’s grind-it-out defensive emphasis.

“We do like to score points, we like transition, we like to get up and down the floor,” he said, while noting that defense wins championships. “Ultimately, it’s about the product — are they good young men of character and integrity?”

Alford called recruiting in fertile Southern California “of the utmost importance.” He had players from the region on his New Mexico roster, including Kendall Williams, who became Mountain West player of the year.

“I will hit the ground running,” he said, noting the respect he has for high school coaches was formed through his father.

Alford’s other head coaching stints were at Iowa (2000-07), Missouri State (1996-99) and Manchester College (1992-95) in Indiana.

Alford is famous in the Hoosier state, where he starred at Indiana University from 1984-87 under coach Bob Knight. The Hoosiers won the national championship in his senior year. He also played on the gold medal-winning 1984 U.S. Olympic basketball team in Los Angeles as a college sophomore. Knight coached that team. Alford said he put in a call to his former coach about taking the UCLA job.

Alford was drafted by the Dallas Mavericks in 1987 and played four years in the NBA before starting his head coaching career at tiny Division III Manchester.

As a high school senior, Alford averaged 37.7 points and was Indiana Mr. Basketball.

Besides Bryce, Alford and his wife, Tanya, have a son, Kory, and a daughter, Kayla.