Will Ferrell and Adam McKay's Gary Sanchez Prods. has landed its first TV series.

HBO has picked up the company's comedy pilot about a baseball player-turned-gym teacher to series with a five-episode order (for a total of six, including the pilot), according to The Hollywood Reporter.

Written by Jody Hill, Ben Best and Danny McBride, the untitled project, also known as "East Bound and Down," centers on Kenny Powers (McBride), a burned-out professional baseball pitcher who returns to his hometown in the South, where the only job he can find is as a substitute gym teacher.

Katy Mixon, John Hawkes and Andrew Daly co-starred in the pilot, which was directed by Hill.

The series, to be filmed in North Carolina, is exec produced by Ferrell, McKay and Gary Sanchez's Chris Henchy, as well as Hill, Best and McBride.