Keiko Fujimori, the daughter of the former Peruvian President Alberto Fujimori, has been arrested as part of an investigation into money laundering.
Mrs Fujimori, who is leader of the opposition in the Peruvian congress, was detained along with her husband.
The judge said they would be held initially for 10 days along with 19 other suspects.
Prosecutors allege she was involved in accepting illegal contributions to her party by the Brazilian firm, Odebrecht.
Mrs Fujimori denies any wrong-doing.
She was shown on television on Wednesday in a car in handcuffs after being detained.
Prosecutors have accused her of leading a criminal group inside her party that took $1.2m (£920,000) in illegal funds from Odebrecht for use during her 2011 presidential election campaign.
Earlier this year, former President Pedro Pablo Kuczynski resigned in a scandal linked to the Odebrecht case.
In a letter published on social media after her arrest Mrs Fujimori said she was being politically persecuted.
"This is called political persecution." she said, "I've been detained without legal grounds."
The arrest came a week after her father had a presidential pardon revoked by a judge.
Alberto Fujimori is expected to return to jail to continue serving a 25-year sentence for human rights abuses.
Keiko Fujimori said her father's arrest was "abusive".
Her Fuerza Popular party has been a powerful opposition force and it currently controls Congress.
But in the last year there have been huge street protests against the political establishment.
At last weekend's local elections, the party suffered its worse losses in decades.