Deutsche Bahn, the German railway operator, has pulled out of an Israeli project that cuts through the occupied Palestinian West Bank, after pressure from activists and Berlin.

The move marks a victory for pro-Palestinian groups and their so-called boycott, divestment and sanctions campaign, which tries to useeconomic pressure on Israel to help the Palestinian cause.

Campaigners were angered by the activities of Deutsche Bahnâ€™s international consulting arm, which provided advice on the electrification of the new track linking Tel Aviv and Jerusalem. The high-speed line, due to be completed by 2017, has attracted sharp criticism from Palestinian officials because a 6-km stretch cuts through the West Bank.

Opponents said the project was illegal because it used occupied Palestinian territory for a project that would be used primarily, or solely, by Israeli citizens. They also argued that the new line could have easily been built on Israeli territory alone, making land confiscations in the West Bank unnecessary.

Deutsche Bahn, which is state-owned, declined to comment on the reasons for the pull-out but said: â€œWe told Israel Railways in February that we would not provide further services for this particular project.â€

The operator added that the involvement in the Tel Aviv-Jerusalem line had been â€œmodestâ€ and that DB International, its consulting subsidiary, would continue to provide services to the Israeli rail operator elsewhere.

According to a letter sent by Germanyâ€™s ministry for transport to a member of parliament, the operator faced criticism for its involvement from the government itself: â€œThe federal government pointed out [to Deutsche Bahn] that the project of the Israeli state railway is problematic from a foreign policy point of view and potentially breaches international law,â€ it said. The letter added that the German operator confirmed â€œin writingâ€ that there would be no further involvement of its international subsidiary in â€œthis politically very sensitive projectâ€.

The document, dated March 11, was published on Monday on the website of Change.org, a campaign group.

Merav Emir, an activist with Who Profits, the campaign group that leads the lobbying effort against the rail project, welcomed the decision. â€œI want to congratulate the German government for making such a clear and bold statement about the illegality of this train route under international law,â€ she said. â€œWe call on other European governments to follow suit in making sure that companies in their countries abide by international law.â€