The USA series “Monk” received two Emmy nominations its first season: one for Tony Shalhoub as the obsessive-compulsive San Francisco detective, and the other for Jeff Beal’s infectious theme music.

But Beal’s jazzy guitar theme has been replaced by a Randy Newman song, “It’s a Jungle Out There,” although Beal — who composed the music for all 13 episodes of the first season — continues to write underscore for the series’ second year.

What gives?

“If you could think of any popular artist who speaks in Monk’s voice, and whose music could reflect the tone and sensibility of ‘Monk,’ it would be Randy Newman,” executive producer David Hoberman says. “The marriage of those two made a lot of sense.”

Beal’s acoustic-guitar theme was inspired by a piece of music (by guitarist Django Reinhardt) that was in the pilot’s early “temp” score. It was one of five he submitted to the producers.

“I was consciously trying to write what I would describe as a catchy, almost annoyingly memorable melody,” he says.

“It’s like Monk in the sense that, when he fixates on something, his obsession becomes at the expense of everything else.”

The tune became an immediate favorite with fans. There are already Internet petitions to drop the Newman song and reinstate Beal’s guitar theme over the opening credits.

Historical notes

Tinkering with music in a popular series is always risky. Several critics took issue with the change. Says New York Daily News critic David Bianculli: “As much as I love Randy Newman, this wasn’t something that was broke that needed fixing. That jazzy, breezy, quirky theme was a perfect marriage of a theme to a character.” Newman, he adds, “is Mr. Movie Theme, but he’s not right for all occasions.”

And Beal, whose music for “Pollock” was widely praised and who recently won an Emmy for music in the NBC Sports documentary “Peggy and Dorothy,” is bummed.

“Monk wouldn’t like this,” he says with a laugh. “If there’s one thing an obsessive-compulsive person doesn’t like, it’s change.”

In the 15 years since the category was inaugurated in 1988, no switcheroo situation like this has arisen. (The vast majority of Emmy-nominated themes have been for cancelled series.)

John Debney’s Emmy-winning main title for “seaQuest DSV” (1993-94) lasted another year before being replaced in 1995, and Mark Isham’s Emmy-nominated theme for “Chicago Hope” (1994-95) was replaced — but by Isham himself, who received another nomination for his second “Chicago Hope” theme in 1995-96.

Hoberman is also cognizant of next year’s Emmy possibilities. Newman — already an Emmy winner for a song from TV’s infamous musical failure “Cop Rock” — is now eligible for next year’s main title theme category.