Hello, Plan B.

New England offensive coordinator Josh McDaniels withdrew his name from consideration Monday from the 49ers’ head-coaching opening, which was “his if he wanted it,” a source told The Chronicle.

With their top choice no longer available, the 49ers have two known remaining candidates: Atlanta offensive coordinator Kyle Shanahan, who is considered their new top target, and Seattle offensive line coach Tom Cable.

McDaniels’ decision to stay in New England instead of guiding the 49ers’ rebuilding project was heavily informed by family considerations. McDaniels, 40, and his wife, Laura, have four young children who enjoy the area.

“At this time,” McDaniels told reporters Monday on a conference call, “it’s just best for my family and myself to remain here in New England.”

McDaniels’ reluctance to move his family across the country also was influenced by the 49ers’ recent instability. The 49ers have fired their head coach after each of the past three seasons, and have dismissed their head coach in each of their past four non-winning seasons.

McDaniels interviewed with the 49ers, Rams and Jaguars on Jan. 7. He entered those meetings with the 49ers as his top choice. He also thought he was ready to become a head coach for the second time after his 11-17 tenure with the Broncos during the 2009-10 seasons.

However, he had a “change of heart” after going through the interview process, the source said. McDaniels spoke highly Monday of the 49ers’ interview team, which was headlined by CEO Jed York and executives Paraag Marathe and Brian Hampton, the latter of whom leads their analytics department.

“I was really impressed with Jed York and Paraag, and Brian, and people that came for the 49ers’ organization,” McDaniels said. “They did a great job with their presentation.”

McDaniels is in a position to be selective before taking his next job.

He’s young by head-coach standards, is employed by the NFL’s gold-standard franchise and has a close connection with one of the greatest quarterbacks in league history in Tom Brady. McDaniels has spent 13 of his 16 seasons in the NFL with the Patriots, who have won four Super Bowls in his two stints with the team and will host the Steelers in the AFC Championship Game on Sunday.

On Monday, McDaniels expressed his appreciation for Patriots owner Robert Kraft and head coach Bill Belichick.

“I've always said how grateful I am for this opportunity to work here for Mr. Kraft and his family and coach under Bill, with a lot of great guys on our staff and have the privilege to work with the players we get to work with each day," McDaniels said. “It’s a great opportunity, very thankful to be here, and very much looking forward to this week against Pittsburgh.”

Meanwhile, the 49ers still could land a well-regarded offensive coach if they can hire Shanahan. Unlike McDaniels, Shanahan, 37, has no experience as a head coach, but he’s in the midst of another impressive season.

The Falcons, who scored the eighth-most points in NFL history (540), beat the Seahawks 36-22 on Saturday to reach the NFC Championship Game. Atlanta will host the Packers on Sunday. Shanahan, the NFL’s fourth-youngest offensive coordinator in 2016, has directed units that have ranked among the league’s top 10 in six of his nine seasons as a coordinator.

Shanahan, as was true with McDaniels, can’t be hired until his team’s season ends.

The 49ers’ other option is Cable, who interviewed Sunday and can be hired immediately. The team interviewed Seattle co-directors of player personnel Scott Fitterer and Trent Kirchner on Monday for its general-manager opening. It’s believed one of them would be hired if they hire Cable.

On Monday, NFL Network reported that former Jacksonville head coach Gus Bradley is waiting to see if Cable is hired by the 49ers before accepting the Chargers’ defensive-coordinator position. Bradley and Cable worked on Seattle’s staff from 2011 through ’12, and Bradley presumably would serve as defensive coordinator if Cable joins the 49ers.

Eric Branch is a San Francisco Chronicle staff writer. Email: ebranch@sfchronicle.com Twitter: @Eric_Branch