Israel's health minister, who heads a powerful ultra-Orthodox political party in Benjamin Netanyahu's coalition, has resigned, saying he opposed continued maintenance work on the country's railways on the Sabbath.
All labour is strictly prohibited by Jewish law on the Sabbath.
Ultra-Orthodox parties have provided Mr Netanyahu with support to stabilise his coalition, while the government carves out large budgets for the minority community.
They have traditionally acted as kingmakers in Israel's fractious coalition building and have in the past threatened to topple coalition governments by robbing them of their majority.
The issue of desecration of the Sabbath has triggered crisis in the past and highlights the cultural chasm between Israel's ultra-Orthodox population and its secular majority.
Much of Israel, including public transport, comes to a halt at sundown Friday for the Sabbath, but few Israelis strictly observe the day of rest.
Many restaurants, cinemas, sporting events and national parks operate, and in secular bastions such as Tel Aviv even some corner stores and shopping centres are open.
Yaakov Litzman's resignation today did not immediately threaten Mr Netanyahu's coalition, but it risked setting off a chain reaction that might.
Later Sunday however, any crisis appeared to have been averted when Mr Netanyahu and the ultra-Orthodox coalition partners agreed to maintain the Sabbath status quo.
Mr Litzman said the work conducted publicly on the railway prompted him to resign.
He said "as a minister in Israel, I can't maintain the ministerial responsibility" of government-sanctioned Sabbath "desecration" that contradicts the "holy values of the Jewish people".
While Mr Litzman said the weekend maintenance work on the railway was not warranted, Israel's railways authority says it must carry out work on Saturday so it does not disrupt transportation for thousands of Israelis during the work week.
Railway and some other public works have occurred for years on the Sabbath.
Mr Litzman's resignation could have exerted pressure on the other two ultra-Orthodox coalition partners to squeeze out concessions from Mr Netanyahu to prove to their constituents that they respect the Sabbath as much as the resigning health minister.
Mr Netanyahu may be hesitant to offer anything perceived as being too generous for fear of alienating secular voters at a time when opposition party Yesh Atid, led by charismatic former journalist Yair Lapid, has been gaining traction in polls.
Mr Netanyahu said later at a government meeting that he regrets Mr Litzman's decision, describing him as "an excellent health minister who did much for the health of Israel's citizens".
He said his coalition would not dissolve over the issue.
Mr Netanyahu stressed that the Sabbath is important to all Israelis, as is the need for "safe and continuous" transport, and added that he was convinced a solution can be found.