Flickr User Kash_if (http://www.flickr.com/photos/kash_if/2762745943/) Being a spy is not easy, especially if you have to worry about your boss revealing your location.

The head of Norway's intelligence service, Janne Kristiansen, inadvertently revealing the presence of Norwegian secret agents in Pakistan at a public parliamentary hearing on Wednesday. She resigned later that day, the BBC reports.

In a transcript of the hearing, an MP asks Kristiansen about the extent of Norway's Police Security Service (PST)'s links with Pakistan. She responds that while the PST has no relationship with Pakistan intelligence, the Norwegian armed forces' intelligence agency — the E service — does.

"The E service has its representatives in these countries, so we co-operate via the E service about this country," she said. She did not give a reason for the agents' presence.

Norway has 400 troops in Afghanistan as part of the Nato-led force, but army intelligence has never confirmed operating agents in Pakistan, according to Deutsche Welle. Unconfirmed reports also say Pakistan has summoned Norway's ambassador in Islamabad to explain the remarks.

While Kristiansen has not broken any laws, her resignation was accepted by the justice ministry because her remarks constituted "a possible breach of confidentiality," Norway's justice minister, Grete Faremo, said in a statement.

Head of the PST since November 2009, Kristiansen had already come under fire for claiming the force could not have been prevented the bombing and shootings by Anders Behring Breivik in July last year.

"Not even Stasi-Germany would have managed to isolate and catch this person," she told state broadcaster NRK three days after the double attack that killed at least 77 people and wounded countless others. "You would almost have had to have a chip inside the head of every single Norwegian, to capture all thoughts."

She later apologized for the comments, but refused to step down, Reuters reports.

Kristiansen's deputy Roger Berg would take over as interim head of the PST, according to the BBC.