"I have come today to show my respect to this court," Yousuf Raza Gilani told the Supreme Court in a statement. "It will not give a good message to proceed against a president who is elected by a two-thirds majority."
"There is complete immunity for head of states everywhere," Gilani told the seven judges presiding over the case.
"I have discussed this with my friends and experts, and they all agree that he has got complete immunity," Gilani added.
The government has always argued that as head of state, President Asif Ali Zardari enjoys immunity from office and has therefore refused court demands to write to the Swiss authorities to re-open long-standing corruption cases.
Exasperated by that refusal, the Supreme Court summoned Gilani to appear on Thursday to face contempt of court proceedings, plunging the weak government deeper into a series of crises likely to force early elections within months.
Analysts say Gilani has to either resign or find a way of satisfying the court order if he wants to keep his job.
Tainted by corruption allegations, Zardari is nicknamed "Mr 10 Percent" and spent 11 years in jail on charges ranging from corruption to murder, although his supporters point out that he was never convicted on those charges.
In 2007, Pakistan's then military ruler Pervez Musharraf imposed an amnesty on corruption cases facing his political opponents, which the courts then overturned in late 2009.
In 2008, Swiss authorities shelved a probe into alleged money laundering by Zardari and his late wife, Pakistani prime minister Benazir Bhutto, who was assassinated in 2007.
The couple were suspected of using Swiss bank accounts to launder about 12 million dollars in alleged bribes paid by companies seeking customs inspection contracts in Pakistan in the 1990s.
A Swiss prosecutor has since said it would be "impossible" to reopen the case against Zardari since he benefits from immunity as a head of state.