Television’s portrayal of the FBI has fortunately come a long way since the old procedural starring Efrem Zimbalist that aired on ABC in the mid-1960s.

Earlier this year, the Hulu series “The Looming Tower” took viewers inside the workings of the bureau’s New York office where real-life agents Ali Soufan (Tahir Rahim) and John O’Neill (Jeff Daniels) fought a nasty turf war with the CIA over intelligence related to al-Qaeda.

“Law & Order” mastermind Dick Wolf has used the New York office as the basis for his latest procedural, somewhat prosaically titled “FBI” (Tuesdays at 9 p.m.) It too has a Muslim agent, the fictitious Omar Adom “OA” Zidan, played by Egyptian-born newcomer Zeeko Zaki. The role was originally written for a Latino detective — until Zaki’s agent slipped the actor the script and told him to put himself on tape. Shortly thereafter, he was summoned to Wolf’s office.

“They were very interested in me being just me,” says Zaki, 28. “I came in so dark and so HBO and they were like, “ ‘Nah … stop. We want America to have a beer with this guy. Bring a little levity into it.’ ”

Zaki, who grew up Muslim outside of Philadelphia, laughs, as if he’s unlocked the secret to getting a job on a network drama. Prior to this big break, he had $300 in his bank account and was taking real-estate classes. He was making a living playing “terrorist and ex-military characters.” In 2017, he appeared simultaneously on the failed Fox series “24: Legacy” and the History Channel series “Six.”

After his meeting with Wolf, Zaki received a script where the first line was in Arabic; the part of the Latino detective had been rewritten. “Zeeko’s Egyptian/Muslim background both grounds and adds depth to the character,” says Wolf. “He speaks fluent Arabic and that character has not been on a series before. I think he is representative of the type of people that are the boots on the ground in the FBI.”

Zaki’s “boots on the ground” experience was put to the test in the pilot, where a series of Bronx apartment buildings exploded. While much of that shattering effect was created by a special effects team, Zaki says there was enough pandemonium on location to bring back memories of 9/11 for members of the crew. “They had cannons in every window. You’re getting covered in soot. You have guys following you around with these dust guns. And there’s fire and everything. And in the moment as an actor, I have no precedent for that,” he says. “It got a little deep. Our director came out, tearing up. It was a very heavy moment. It kind of showed us how important is to represent FBI agents.”

Besides doing his bit to make viewers aware of the personal sacrifices made by FBI agents, Zaki sees a larger purpose to his role as Zidan — to rehabilitate the image of his people on American TV, since he’s all too aware that Muslims have been the go-to enemy on network series for years.

Zaki sees “FBI” as a chance to change “the narrative for Arab-Americans and help create a platform and a voice — I hate the word ‘tolerance.’ I was given this platform and this opportunity so we have to figure out how to use it for good. I have a lot of Arab-American actor friends and everyone is sick and tired of playing terrorists and crying mothers.”