Pete Hughes and Virginia Tech lost to Oklahoma in an NCAA tournament regional this season. Now, Hughes will lead the team that eliminated the Hokies. (Michael Shroyer/AP)

When Virginia Tech hosted an NCAA baseball tournament regional for the first time in program history earlier this month, it was Oklahoma that ended the Hokies’ season with a 10-4 win. On Thursday, the Sooners officially made off with Virginia Tech’s coach as well.

Virginia Tech announced that baseball Coach Pete Hughes is leaving the school to accept the vacant head coaching position at Oklahoma. Athletic Director Jim Weaver has promoted associate head coach Pat Mason, who served as the Hokies’ pitching coach and recruiting coordinator the past three years, to head coach.

Weaver said during an afternoon news conference that he gave Oklahoma permission to contact Hughes last Friday and met with Hughes for 75 minutes Wednesday to persuade him to stay. Although he planned to increase Hughes’s salary, the coach told Weaver to “not try to put a huge package together because unless his family didn’t like [Oklahoma], he was going to go.”

Weaver said Mason signed a five-year contract that will pay him a base salary of approximately $145,000, with $40,000 in potential incentives his first year. Hughes earned approximately $157,000 this past season.

This is the sixth straight coaching search in which Weaver has hired from within, including the men’s and women’s basketball, men’s and women’s soccer and women’s lacrosse programs.

“The bottom line was there was not going to be a bidding war,” said Weaver, who noted Oklahoma wooed Hughes by flying him out to Norman, Okla., on a private jet owned by country music star Toby Keith.

Hughes, 45, came to Blacksburg, Va., from Boston College in 2007, and over the course of seven seasons transformed the Hokies from ACC doormats to conference contenders. He finished with a 222-144 record at Virginia Tech, the third-most wins in program history, and guided the Hokies to the NCAA tournament in 2010 and 2013.

Hughes had been mentioned as a candidate for head coaching positions at Georgia and Auburn in recent weeks, but told reporters at the time, “there’s no place I’d rather be” than Virginia Tech. Former Oklahoma Coach Sunny Golloway recently left Norman, Okla., to accept the same position at Auburn.

Hughes revealed on Twitter earlier this month that he suffered a heart attack and drove himself to the hospital on June 6, just three days after the season ended. Since then, though, it also appears he had a change of heart regarding his future.