Gar-Field boys’ basketball Coach Andy Gray has resigned after 20 seasons, with a 343-143 record.

Gar-Field‘s Andy Gray, one of the longest-tenured boys’ basketball coaches in Northern Virginia and also one of the most successful, stepped down Friday morning, citing family reasons.

Gray’s teams went 343-143 with six Virginia AAA Cardinal District titles (including this past season), 11 district runner-up finishes, 12 Northwest Region tournament berths and three region titles.

The Indians reached the 2001 state championship and the state quarterfinals four other years. Gar-Field finished the 2011-12 season ranked No. 14 by The Post and went 22-5 last season.

“I need to take some of this time that I’m spending coaching and invest it in my wife and two kids,” said Gray, 48, whose two sons, three years apart, will both be Gar-Field students this fall.

Gray will continue in his role at Gar-Field as a teacher on administrative assignment and has not ruled out a return to coaching at some point.

“It’s certainly gone very quickly,” said Gray, a Roanoke area native who planned to return to that area early in his coaching career. “This job became such a wonderful experience that living up here was worth the squeeze as far as the fast pace, the traffic. That wasn’t anything that I was accustomed to. But this job became such a love that we stayed.

“The administration and faculty always have been tremendously supportive of the program and appreciative of the work of the kids and the staff. For me to stay this long is a tribute to them and how nice they’ve made this job. These kids have had big hearts and really bought into what we’ve tried to teach and that’s made it fun. We’re not going anywhere. It was just time. It’s my hope now that this [resignation] is not it [as a coach].”

Only one current boys’ basketball coach in Northern Virginia has coached at his current school longer than Gray, and that’s Chantilly‘s Jim Smith, who has been at his school since 1991.

There are three Gar-Field graduates on Gray’s coaching staff. Jamel Perkins was with Gray for 19 years, Jason Bell for 13 years and Chris Vann for the past few. Head coaches Kevin Brown (Mountain View), Troy Washington (Kettle Run) and Al Ford (Brentsville) also coached under Gray.

During his tenure, Gray had only a handful of players who went on to Division I programs, all mid- or lower-level, including recently graduated senior Zach Fong (Navy). The Indians have been known more for their teams than their stars.

“He’s the type of coach that always did the most with what he had,” said Potomac (Va.) Coach Keith Honore, a Panthers assistant or head coach for almost Gray’s entire tenure. “If they were great teams, he got the most out of his great teams. If he had a team that was a little less talented than the competition, he was a coach who knew how to maximize his kids’ talents and get the most out of them. That’s what coaches are supposed to do, and he was outstanding at it.

“He really paid attention to detail, which forced other coaches to do the same thing. He would make you stay up late at night trying to make you figure out how you were going to beat him. We’re losing a great one.”