NBC has acquired drama pilot “Legends” from 20th Century Fox TV, with Howard Gordon (“24,” “Homeland”) and Jeffrey Nachmanoff exec producing.

Nachmanoff will direct his own script, about an undercover agent who takes on legendary identities — while coming to face the possibility that his own identity is fictional as well.

Nachmanoff and Gordon formed a partnership after the former directed two episodes of “Homeland,” the Showtime freshman hit.

The writer shares script credit on 2004’s “The Day After Tomorrow” with Roland Emmerich, and also has co-authored “The Last Stand,” a feature with Arnold Schwarzenegger and Forest Whitaker scheduled for a 2013 release.