CARACAS, Venezuela (AP) _ The story has almost everything: two powerful women caught up in charges of corruption, a presidential love affair, even an alleged check from the notorious Bank of Credit and Commerce International.

The tale has made a best seller and become the talk of a nation where oil wealth and political power often combine to create corruption and scandal.

Blanca Ibanez and Cecilia Matos, both in their mid-40s, have little in common except professed love for two Venezuelan leaders from the Democratic Action Party: Ibanez for former President Jaime Lusinchi, 68, and Matos for Lusinchi's 69-year old successor, President Carlos Andres Perez.

''They hate each other to the point that a reconciliation is impossible,'' said Carlos Capriles Ayala, a historian who wrote ''Sex and Power in Venezuela.'' The book sold 40,000 copies in a few months, largely because of the chapters on Ibanez and Matos.

Ibanez became Mrs. Lusinchi last year. She recently sought and received political asylum in Costa Rica, claiming ''political persecution'' at home. Her husband divides his time between Caracas and San Jose.

As for Matos, judges in Caracas and San Cristobal are investigating apparent wealth that has been described as excessive for someone who was a congressional secretary.

Matos is said to have been involved with Perez for years. According to knowledgeable sources, they have two daughters, whom Perez has legally recognized.

Mrs. Perez, who shares the official residence with the president, has not commented publicly on the affair.

Costa Rica's decision to accept Ibanez caused protests in Venezuela.

''Giving asylum to a person to evade justice is a slap in the face of justice,'' said Paciano Padron, a legislator from the opposition Social Christian Party.

Ambassador Julio Sunol of Costa Rica resigned over the asylum decision. He said it disregarded the opinions of both himself and Perez, who won the Democratic Action nomination over Lusinchi's opposition and became president in 1989.

Sunol told his Foreign Ministry that Perez viewed the decision as ''madness.''

Lusinchi reacted angrily, declaring in a statement that the diplomat was ''vulgar and insensitive'' to Ibanez's plight.

Venezuela has been afflicted with seemingly endless charges of fraud and influence peddling in recent years.

Army officers who tried to overthrow Perez in February said corruption was a major reason for the uprising, which cost dozens of lives.

A few weeks ago, a group calling itself the Bolivarian Armed Forces after Simon Bolivar, the Latin American liberator, claimed responsibility for the attempted assassination of a union leader accused of corruption.

Two weeks later, the newspaper El Nacional quoted a leader of the movement, identified as ''Commander Zacarias,'' as saying it was ready to attack Ibanez, Matos, and other people suspected of corruption.

Ibanez was ordered arrested last year, along with five former officials, in connection with a fraud involving the purchase of 60 jeeps. Typically, the warrant was signed after the suspects had left the country.

Congressional investigators say $6 billion was lost to fraud during Lusinchi's five years as president.

Part part of that reflects the discretion allowed in spending public funds in Venezuela, analysts say. The jeeps were bought with secret Interior Ministry funds allocated to state security, for instance, and most became gifts for party officials and secretaries.

Jose Angel Ciliberto, the interior minister who bought the jeeps, said Lusinchi told him to do it. Lusinchi called Ciliberto a liar.

Judicial sources said Ibanez, then Lusinchi's private secretary, was directly involved. They were married after he divorced Gladys Castillo, his wife of more than 40 years.

Capriles, the historian and author, says Ibanez was ''the most influential woman in the country's political history.''

Tony Bianchi, editor of The Daily Journal, an English-language newspaer, wrote of her: ''Only God knows the number of scams she was involved in.''

Ibanez has refused to return to Venezuela - claiming, perhaps with some justification, that she could not get a fair trial.

Venezuelan courts often are accused of bowing to political pressures, and recent polls indicate up to 80 percent of those responding distrust the legal system.

Among Ibanez's foes is Luis Pinerua Ordaz, now the interior minister. In 1988, he used an the old Spanish word barragana, equivalent to concubine, to describe her relationship with Lusinchi.

Pinerua blocked Ibanez's attempt to win a congressional seat in 1988 elections, but at a high price: He also was prohibited from running on the party list.

By comparison, Cecilia Matos has kept a low profile, merely turning up on society pages now and then. When a photographer took pictures of her during an unexpected visit to the government palace two years ago, police guards seized his film.

Lately, news about Matos has become more prominent. Last month, a judge asked the Venezuelan Embassy in Washington to find out whether she owned real estate in the United States and to check her bank accounts.

He acted in response to reports that Matos was living in an expensive apartment in New York City, protected by bodyguards paid with government funds.

El Nuevo Pais, a Caracas newspaper, printed a copy of what it described as a 1990 deposit to a New York bank account belonging to Matos of a $400,000 check from the now-defunct Bank of Credit and Commerce International, which is under investigation for fraud in several countries.

Her lawyers said no such deposit was made and filed suit against the newspaper's editor, Rafael Poleo, a fierce critic of Perez.

Judge Luis Guillermo La Riva also ordered the investigation of a villa on the Caribbean island of Coche allegedly owned by Matos.

In San Cristobal, western Venezuela, temporary Judge Luis Quintero ordered an investigation of allegations that Matos was paying for construction of a $1.5 million museum honoring Perez. Reports say few people have been allowed into the museum in Rubio, the president's hometown in the Andes, and that its contents and opening date are secret.

Quintero told Matos not to leave the country and announced a list of 134 questions for Perez. Soon afterward, Quintero was notified that he was being removed from the temporary judgeship before the term expired.