Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Bryan Whitman, the Pentagon's top public affairs official, has entered an agreement with prosecutors to keep him out of jail after he was charged with stealing license plates from a neighborhood car, according to court documents.

Principal Deputy Assistant Secretary of Defense for Public Affairs Bryan Whitman. Eboni Everson-Myart / U.S. Defense Department

Whitman, 58 — who as principal deputy assistant secretary of defense for public affairs is one of the highest-ranking civilians in the Pentagon — remains on the job, deputy Pentagon press secretary Gordon Trowbridge told NBC News on Wednesday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Records filed Tuesday in D.C. Superior Court show that Whitman and Washington, D.C., prosecutors have agreed to defer his prosecution on three counts of first- and second-degree theft, which were filed May 5.

The charges will be dismissed next year if Whitman pays restitution, completes about a week of community service and doesn't run afoul of the law in any other way, according to the agreement.

The records give no clue as to what the case is actually about, and Trowbridge said he couldn't comment further because it's a personnel matter.

But The Washington Post reported Wednesday that police visited Whitman at his Capitol Hill home about a month after the license plates on a car used by a neighbor's nanny were stolen on April 6. That was two days after a mysterious note was left on her car, which she's allowed to park in the neighborhood under Washington's Visitor Parking Pass program.

"I know you are misusing this visitor pass to park here daily," the note read, according to The Post. "If you do not stop I will report it, have your car towed and the resident who provided this to you will have his privileges taken away."

The nanny's employers reported the theft and replaced the missing plates. They did it again a week later when her rear license plate was stolen again, The Post reported. And they put a surveillance camera in their front window.

Then, on or about April 20, the camera hit paydirt. It recorded Whitman repeatedly walking around and crouching behind the car before getting in his own car and driving away, The Post reported. When police served a search warrant on May 2, Whitman handed over the plates, it said.

Whitman has worked in the Pentagon's press office for more than 30 years, serving defense secretaries of both parties and frequently appearing on TV during the Iraq War. He was promoted to principal deputy assistant secretary in May 2010.

An earlier version of this article misspelled Whitman's name as Whitfield on one reference.