By NIKI KITSANTONIS, New York Times

ATHENS — With their country running desperately low on cash, Greek officials met on Tuesday with the head of the Russian energy giant Gazprom, spurring speculation about a possible multibillion-dollar pipeline deal between Athens and Moscow.

The talks, which officials cautioned were not expected to lead immediately to a deal, came at a crucial time. The European Union is expected on Wednesday to announce antitrust charges against Gazprom, while Greece is trying to negotiate a new debt deal with its European creditors that the country needs to avoid a default.

Prime Minister Alexis Tsipras of Greece met on Tuesday afternoon in Athens with the Gazprom chief, Aleksei B. Miller. The Greek energy minister, Panagiotis Lafazanis, met with Mr. Miller earlier in the day. A spokesman for the energy minister said only that the two discussed “matters of energy cooperation.” Mr. Tsipras’s office declined to comment.

But both Russia and Greece have financial and political reasons for holding such discussions. In Gazprom’s case, it would be an effort to continue seeking an entry point to Europe for natural gas that would bypass pipelines that run through Ukraine, which is now Russia’s enemy.

For Greece, a pipeline could in theory generate billions of euros a year in revenue. But shorter term, Mr. Tsipras’s government is continuing to signal that it could tilt toward Russia if Greece, which is perilously close to running out of money, cannot reach new terms with its European lenders. Greek officials are to meet with their creditors on Friday in Riga, Latvia.

Even if Gazprom and Greece struck a deal, a pipeline meant to carry Russian gas to Europe through Turkey and Greece would face a variety of political and regulatory obstacles. That includes the antitrust case that European regulators are expected to announce on Wednesday, charging Gazprom with abusing its dominance in gas markets. The European Union depends on Russia for about a third of its natural gas, and some Eastern European countries are wholly reliant on Russian gas.

Moscow and Gazprom had been developing plans for several years to build a new western route under the Black Sea — envisioned initially as running through Bulgaria and known as the South Stream pipeline.

The European Commission, the European Union’s executive agency, spent years scrutinizing the South Stream plan. The commission did not want South Stream to increase Russia’s dominance of the European gas market. So European officials said that Gazprom would be required to share the pipeline’s capacity with other operators in order to comply with the bloc’s laws fostering competition.

More recently, European Union officials feared that Gazprom’s plan to shift the large volumes of gas now routed through Ukraine, piping much of it instead through South Stream, would further weaken Kiev in its struggle with Moscow.

As a result of Europe’s resistance, Russia in December said it would shift the planned landing point for the undersea pipeline to Turkey. Russia and Turkey, though, have yet to reach a deal for that plan.

Speculation about extending the Turkey plan to include Greece as the gateway to Europe began heating up after Mr. Tsipras visited Moscow this month. Discussions were said to include a possible pipeline deal, as well as a discount on the price Greece pays to Gazprom for natural gas.

Greece gets about three-quarters of its gas from Russia, but for Gazprom, it is a relatively small customer. Even Turkey, despite being the second-largest market for Russian gas in the region after Germany, would not be a big enough buyer on its own for all the gas Gazprom would eventually plan to send through a Black Sea pipeline.

For a new pipeline to Turkey to make economic sense, the gas would need to flow through Greece to reach Central and Western European markets. But the Gazprom plan could encounter some of the same resistance from the European Union that led to the South Stream plans’ being scrapped last year.

On Tuesday, a spokeswoman for the European Commission said that any new project between Gazprom and Athens would need to pass European muster.

“We are ready to offer our assessment on any such agreement, any such deal, and its implications when we have something to base our assessment on,” Anna-Kaisa Itkonen, a spokeswoman on energy matters for the European Commission, told a daily news conference. But, she added, “Any pipeline or any other sorts of projects operating in the E.U. area must comply with E.U. legislation.”

The European Commission declined to comment on the expected antitrust case against Gazprom. But that case is expected to focus in part on whether Gazprom is blocking gas flows to some parts of Europe and thwarting customers’ efforts to diversify their supply.

The antitrust charges would not directly affect Gazprom’s ability to make a gas deal with Athens, said Mario Mariniello, an antitrust expert with Bruegel, a research organization in Brussels. “There would be no legal restriction here, and, besides, I really believe that Vestager wants to act independently of geopolitics,” Mr. Mariniello said, referring to Margrethe Vestager, the European competition commissioner.

But other European Union policy makers might be skeptical about letting Gazprom use Greece as a gas gateway to Europe.

“The problems they came across in Bulgaria are more or less the same questions they are going to come upon in Greece,” Trevor Sikorski, a gas analyst at the market research firm Energy Aspects, said about Gazprom. “As soon as they come into the E.U., they are going to have to comply with the regulatory arrangements of the E.U.”

Turkey, in its talks with Russia over the proposed pipeline, has demanded a considerable discount on the price of gas from Russia, and it is a main element in the negotiations, said a Turkish Energy Ministry official who asked not to be identified because of the delicacy of the talks. Other countries like Greece expressing an interest in the project could make the talks run smoother, the official said.

“We consider these talks important because the pipeline project would not work unless European clients sign up for it,” he said.

Greek and German news outlets reported recently that Gazprom was considering providing up to 5 billion euros, or $5.38 billion, as an advance for the extension of the so-called Turkish Stream pipeline, which has yet to be built. Greek and Russian officials have declined to comment on those reports.

A cash injection could hardly come at a better time for Greece, which is expected to run out of money within weeks unless it gets outside help. But it remains unclear whether Mr. Tsipras is prepared to take the political and geopolitical risks that could come with strengthening ties with Russia. His trip to Moscow this month riled European officials, and Greece will need the forbearance of its European creditors and the International Monetary Fund if it is to survive its latest debt crisis.

Even if Greece secured financing from Russia, the future of the pipeline would not be certain, and Athens needs money urgently. The desperate situation of Greece’s finances was highlighted on Monday when the government issued a decree forcing state bodies, with the exception of pension funds, to move their cash reserves to the central bank for the government’s use.

Greece’s dwindling financial reserves, and its debt talks with creditors, are expected to be on the agenda at the meeting in Riga on Friday of finance ministers from eurozone countries. Despite Greece’s looming cash crunch and fears about a possible Greek default and exit from the eurozone, European officials have said that they do not expect Friday’s meeting to yield a decision on whether to unlock additional financing.

Russia has economic problems of its own. At an annual report to Parliament, Prime Minister Dmitry A. Medvedev estimated on Tuesday that his country’s economy had lost $26.8 billion because of low oil prices and sanctions introduced last year by the European Union and the United States. In his speech, Mr. Medvedev estimated that Russia’s economy had shrunk 2 percent in the first quarter of 2015.