TEL AVIV — For decades, Israel was an energy-starved country surrounded by hostile, oil-rich neighbors.

Now it has a different problem. Thanks to major offshore discoveries over the last decade, it has more natural gas than it can use or readily export.

Having plenty of gas is hardly a burden, and it offers a cleaner-burning alternative to Israel’s longtime power sources. But it presents challenges for a country that wants to extract geopolitical and economic benefits from a rare energy windfall, including building better relations with its neighbors and Europe.

Part of the problem is timing. Just as Israel prepares to produce and export large amounts of gas, the United States, Australia, Qatar and Russia are flooding the market with cheap gas. The other is math: Israel’s 8.5 million people use in a year less than 1 percent of the gas that has been found in the country’s waters.