TV

Heigl’s road back to the small screen

Katherine Heigl left TV — and “Grey’s Anatomy” — to become a movie star.

And then she came crawling back.

That, in a nutshell, is her story in recent years.

After one breakout big-screen hit, “Knocked Up,” Heigl is returning to the small screen to play a CIA agent in a series pilot for NBC.

The actress has taken a page from Claire Danes’ playbook a la “Homeland” and will play a key “maverick” CIA analyst whose job it is to plan strategy sessions with the president on matters of global and national security.

Following the boilerplate plot, Heigl’s character will balance this stressful job with a complicated personal life in the vein of Carrie Mathison, Danes’ character on “Homeland.”

Heigl won an Emmy for “Grey’s Anatomy” and then went on to complain about the quality of the scripts — which didn’t win her many friends in Hollywood.

After leaving the ABC series, she went on to star in some middling rom-coms (“27 Dresses,” “Killers,” “The Ugly Truth”) and one box-office bomb (“One For the Money”).

Heigl and her mother, Nancy Heigl, are the executive producers of the NBC pilot.