(Reuters) Pakistan's interior minister and prime minister have both denied the government is holding peace talks with its homegrown Taliban, according to media, saying it would do so only if the militants first disarmed and surrendered.

The deputy commander of the Pakistan Taliban, who have been waging a four-year war against the government in Islamabad, said Saturday that the two sides were holding talks, a move that could further fray the U.S.-Pakistan relationship.

But both Prime Minister Yusuf Raza Gilani and Interior Minister Rehman Malik denied the reports.

Categorically, I'm telling on behalf of the government, no dialogue, Malik told reporters in Islamabad.

Gilani left the door open to negotiations. Whosoever surrenders and denounces violence, they are acceptable to us, Gilani said in an interview with the BBC.

At the end of September, Pakistan's government pledged to give peace a chance and talk with its homegrown militants.

Maulvi Faqir Mohammad, the deputy commander of the Tehreek-e-Taliban Pakistan (TTP), also known as the Pakistani Taliban, told Reuters Saturday that talks for an end to the insurgency were under way.

(Writing by Chris Allbritton; Additional reporting by Jibran Ahmad in PESHAWAR and Qasim Nauman in ISLAMABAD; Editing by Nick Macfie)