Last night the Israeli dance troupe Batsheva's stint at the Edinburgh International Festival finally drew to a close.

It was an eventful run, to say the least. For three nights they have been picketed, shouted at, interrupted, hectored and applauded. Scottish critics have praised the art of the dancers from Tel Aviv, but some Scottish artists have questioned whether they should have been allowed to dance in this country. Culture is once again on the front line of political protest. The opening night saw the performance interrupted three times by protesters.

Writer Jackie Kemp was in the audience that night. "It was a very aggressive, bullying atmosphere outside. There were 200 people accusing the thousands who were going into the theatre of being implicated in war crimes.

"In the theatre, I bought a fridge magnet with the EIF 2012 logo, which is a rather beautiful image of the doves of peace. I decided to give it to a protestor as a gesture of conciliation but when I went outside there were 200 people yelling at the tops of their voices: 'Your tickets are covered in Palestinian blood'. I went over to try to give one the fridge magnet but when I leaned through the police lines to hand it over it seemed to enrage them even further and they all started screaming and spitting abuse at me and the police had to usher me away."

Not a typical night at the Edinburgh International Festival then. In truth the cultural boycott against Israel has been ongoing for some time now with musicians, artists and writers coming under pressure not to visit Israel as pro-Palestinian groups react to Israeli politicians talking of culture being one of the vehicles they can use to promote "Brand Israel" to the wider world. The Israeli Ministry of Foreign Affairs has even stated that Batsheva is "the best known cultural ambassador of Israeli culture".

Such statements have simply thrown petrol on the flames. The fact that Batsheva has accepted financial assistance from the Israeli government, some have argued, makes them complicit with Israeli government policy. "Every single performer will have played their role, and continue to play their role, in enforcing the state of Israel's occupation of Palestinian land, the subjugation of its people and the denial of their rights," Hugh Humphries, secretary of the Scottish Friends of Palestine, wrote in an open letter to the director of the Festival, Jonathan Mills.

The letter then proceeded to put Mills himself in the dock. "You are inviting your audience to applaud those who are directly involved in the cruel and inhumane treatment of the Palestinian people."

The protests were not confined to activists either. On Wednesday, an open letter was published signed by Scottish writers, actors and musicians attacking Mills for refusing to cancel the performances by the Israeli dance troupe. Tom Leonard, Liz Lochhead, AL Kennedy, Tam Dean Burn, Dick Gaughan and Iain Banks were among the signatories.

Some, on the opposing side, however, including the dancers themselves, have claimed that artists seeking to censor other artists is absurd and extreme.

Lochhead, the Scottish makar, has previously not supported the idea of academic boycott against Israel. However, she released a statement this week explaining her support for boycott following a fact-finding trip to Palestine. "Obviously in principle I am against the censorship of ideas," she said. "But having visited Palestine in June this year, and having seen how Palestinians are treated like non-humans, I believe we must use sanctions in the way they were used to bring apartheid to an end in South Africa."

Speaking to the Sunday Herald, the poet Tom Leonard explained his own position. "I don't have a default position on boycotts generally but the situation in Israel-Palestine is one of a people largely dispossessed and refused return to their homeland, whilst those of that people who remain receive daily harassment constriction and significant oppression to the substantial and proven danger, detriment, and loss of their lives.

''Palestinians do not enjoy untrammelled freedom of movement within their own land let alone simple freedom to travel from it for such as to express their culture. It is wrong in this circumstance that an Israeli dance group freely allowed to travel abroad and re-enter Israel should be welcomed as if this such cultural freedom of expression had nothing to do with the lack of the same freedom for most Palestinians.

''To welcome this group therefore is effectively to stand with that freedom for Israelis against the basic rights and freedoms of the Palestinians. This is not a morally desirable position, and a boycott of Israeli cultural and material export, as requested by Palestinians themselves, seems a proper position to adopt."

These are strongly held and strongly expressed views. In response, a spokesperson for the Edinburgh Festival defended its decision to bring Bastsheva to Edinburgh. "The Festival defends the rights of all artists, irrespective of nationality, creed or culture, to have their voices heard." But what's striking is how familiar all of this is.

As Lochhead's comments make plain there are echoes here of the fight against apartheid in South Africa in the 1960s, 1970s and 1980s. Indeed, pro-Palestinian activists have begun to talk of an Israeli Apartheid when speaking of Israel's treatment of the occupied territories. In this they are following on from no less a figure than Archbishop Desmond Tutu who, in 2010, explicitly compared Israel's actions with the apartheid regime in South Africa. The anti-apartheid protests

also took the form of sporting and cultural boycotts and protests. The moment that crystallised the collision between culture and boycotts back then came when Paul Simon travelled to South Africa in 1985 to record musicians for his Graceland album, breaking the UN cultural boycott on South Africa in the process.

More than a quarter of a century on, though, there are voices who doubt the efficacy of such cultural boycotts. Earlier this year the Irish commentator – and former Irish anti-apartheid activist – Fintan O'Toole said that the cultural boycott turned out to be "a very blunt instrument" in the fight against apartheid. "The ban became arbitrary and self-defeating," he argued in the Irish Times. "It made no sense to prevent, for example, the Market Theatre of Johannesburg, which was desegregated and presented searing work on the corrupting effects of apartheid, to be denied international contact. Attacks on Paul Simon for working with black South African musicians on his album Graceland teetered into a self-defeating absurdity that threatened to discredit the whole boycott movement."

The question is, do boycotts work? There is widespread acceptance that the boycott on South Africa did help shift the political landscape of that country in the long run, but not everyone agrees. The Scottish novelist Ewan Morrison takes a contrary position to the writers who signed the letter to Jonathan Mills. "I'm suspicious of cultural boycotts as they are simplistic, single 'blanket' declarations, the kind of thing that lazy liberals like to indulge in so they can say they have 'done something'. They rarely work effectively and are often counter-productive in that they can silence people on both sides of a debate. I think about how Paul Simon broke the cultural boycott against the apartheid regime in South Africa, to work with indigenous South African choir Ladysmith Black Mambazo, who then went on to win three grammys. Arguably, Ladysmith helped popularise political issues in South Africa more effectively than the boycott did.

"Furthermore, cultural boycotts are tokenistic and give a bloated sense of the importance of the culture industries. A boycott on trading in the currency of a country, or boycotting their exports would be much more effective."

Batsheva have now packed their bags and moved on. The shouting is over for the moment. The debate may have some way to run.