Ken Niumatalolo, who interviewed for BYU's head-coaching job on Monday, will remain the coach at Navy, the team said Wednesday night.

Niumatololo was offered the position at BYU but declined, a source told ESPN's Joe Schad.

"It was a long and agonizing two days, probably the hardest two days of my life, but the Naval Academy has been my life for the last 18 years, and I love it here," Niumatololo said in a statement. "I love the kids that go to school here and the people I work with."

Niumatalolo confirmed on ESPN's College GameDay that he was meeting with BYU about the position, saying that while he had received interest from several schools, the BYU job "was just different" for him because of his faith. Niumatalolo is a member of the The Church of Jesus Christ of Latter-day Saints. His son Va'a is a sophomore linebacker at BYU, and his other son, Ali'i, has committed to play at Boise State beginning in 2018 after he serves a two-year mission for the church.

"BYU was something I need to look into because of my faith and the opportunity to coach my two sons," Niumatalolo said. "But ultimately, I decided to stay at the Naval Academy because this is the best place for me and my family, and we are at peace with the decision."

Ken Niumatalolo, who visited BYU about its opening on Monday, said Wednesday "after a long and agonizing two days" he had decided to stay at Navy. Ken Murray/Icon Sportswire

Niumatalolo's decision followed a week of speculation leading up to Navy's game against Army last Saturday. He traveled to Utah on Sunday night and met with BYU officials on Monday.

"I'm glad to have this all behind us," Navy athletic director Chet Gladchuk said. "It's been very stressful for everyone involved. There was never any reason in my mind for Kenny to leave, but he had to go through this exercise to be sure.''

Niumatalolo was the top choice to replace Bronco Mendenhall at BYU. The school also has interviewed Kalani Sitake, a former BYU player and current Oregon State defensive coordinator, for the position.

The job at BYU opened when Mendenhall left for Virginia after 11 seasons with the Cougars. During that period, the Cougars were one of only 11 programs to advance to a bowl game each season, including this one, winning six of those games.

Niumatalolo is the all-time winningest coach at Navy, with a 67-37 record in eight seasons. He took over for Paul Johnson, now coach at Georgia Tech, in December 2007 and signed a long-term extension with Navy in April 2011.