Legal opinions supporting the action
Alan Dershowitz, a professor of Law at Harvard University, wrote that the legality of blockades as a response to acts of war “is not subject to serious doubt.” He likened Israel’s maritime blockade of Gaza to United States naval actions in Cuba during the Cuban Missile Crisis, which the U.S. had deemed lawful although not part of an armed conflict. Dershowitz argued that action taken in international waters is permissible if "there is no doubt that the offending ships have made a firm determination to break the blockade."
Mark Regev, spokesman for the Prime Minister of Israel, referring to the San Remo Manual on International Law Applicable to Armed Conflicts at Sea, said:
The San Remo memorandum states, specifically 67A, that if you have a boat that is charging a blockaded area you are allowed to intercept even prior to it reaching the blockaded area if you've warned them in advance, and that we did a number of times, and they had a stated goal which they openly expressed, of breaking the blockade. That blockade is in place to protect our people.
"The Israeli blockade itself against Gaza itself is not illegal, and it's okay for Israeli ships to operate in international waters to enforce it," said Allen Weiner, former U.S. State Department attorney and legal counselor at the American Embassy in The Hague, and now a Stanford Law School professor.
Professor Ruth Wedgwood, the Edward B. Burling Chair in International Law and Diplomacy at the School of Advanced International Studies at Johns Hopkins University, said that under the law of armed conflict, which would be in effect given Hamas's rocket attacks on Israel and Israel's responses, Israel has "a right to prevent even neutrals from shipping arms to [Hamas]," and that "the right of visit and search under the law of the sea, or under the law of armed conflict, can be conducted on the high seas". Pointing out that the U.S. itself, as a neutral throughout most of the 1800s, submitted its ships to inspections on the high seas to allow belligerents to make sure that its cargoes weren't actually fueling any of the European wars, and the U.S. itself blockaded Cuba during the Cuban Missile Crisis, she also noted that in the wars in Yugoslavia, the U.N. itself, and NATO, through Operation Sharp Guard, imposed a blockade on shipments to Yugoslavia. She opined that the goal of the flotilla was to: "denude Israel of what it thinks it was guaranteed in the 1993 Oslo Accords, which is the control of the external borders of Gaza and West Bank.... The problem ... is that you could easily have a rearming of Hamas, which caused a terrible conflict."
According to Abbas Al Lawati, a Dubai-based Gulf News journalist on board the flotilla, Israel is likely to cite the Gaza–Jericho Agreement (Annex I, Article XI) which vests Israel with the responsibility for security along the coastline and the Sea of Gaza. The agreement stipulates that Israel may take any measures necessary against vessels suspected of being used for terrorist activities or for smuggling arms, ammunition, drugs, goods, or for any other illegal activity.
Tel Aviv University law professor Yoram Dinstein, author of The Laws of War at Sea, has written that "there are several instances of contemporary (post-UN Charter of the Law of the Seas) practices of blockades, e.g., in the Vietnam and in the Gulf War."
Philip Roche, a partner in the shipping disputes and risk management team with the London-headquartered international law firm Norton Rose, said: "On the basis that Hamas is the ruling entity of Gaza, and Israel is in the midst of an armed struggle against that ruling entity, the blockade is legal." The basis for that is the law of blockade, derived from international law that was codified in the 1909 London Declaration concerning the Laws of Naval War, and which was then updated in 1994 in the San Remo Manual on International Law Applicable to Armed Conflicts at Sea--"a legally recognized document". Under the law of a blockade, a ship can be intercepted on the high seas as long as it is ship is bound for the blockaded territory. As to the use of force when boarding a ship in such circumstances, it is legal but must be proportionate, according to Commander James Kraska, professor of international law at the U.S. Naval War College. Proportional force does not mean that guns cannot be used by forces when being attacked with knives, but "there has got to be a relationship between the threat and response," said Kraska. According to J. Peter Pham, a strategic adviser to U.S. and European goverments, "from what is known now, it appears that Israel acted within its legal rights".
Legal opinions opposing the action
Richard Falk, professor emeritus of international law at Princeton University and U.N. Special Rapporteur on the situation of human rights in the occupied Palestinian territory said that the “ships were situated in the high seas where freedom of navigation exists, according to the law of the seas” and called for those responsible to "be held criminally accountable for their wrongful acts".
Former British Ambassador Craig Murray explained that the raid was not an act of piracy, as the Israeli vessels carried a military commission, but said that it would be "an act of illegal warfare". According to Murray, the Law of the Sea rules that, when an incident takes place on a ship on the high seas the applicable law is that of the flag state of the ship on which the incident occurred, so the Turkish ship was Turkish territory. If the Israeli commandos were acting on behalf of the government of Israel in killing the activists on the ships, Israel would be in a position of war with Turkey, and the act would fall under international jurisdiction as a war crime. If, on the other hand, the killings were not authorised Israeli military action, they were acts of murder under Turkish jurisdiction and if Israel does not consider itself in a position of war with Turkey, then it must hand over the commandos involved for trial in Turkey under Turkish law.
In a legal analysis published by the Frankfurter Allgemeine Zeitung, a staff expert on international law explained that countries are not allowed to extend their sovereignty on areas outside of their coastal waters. In a zone extending 24 nautical miles (44 km) from the coast, countries have the right to inspect ships in order to enforce immigration and public health laws and regulations. In international waters, if there is reasonable suspicion of piracy or human trafficking, a country has the right to access foreign ships. If the suspicion remains, it can search the ship. Israeli soldiers have the right to defend themselves. If Israel has used force against the ships without legal justification, the crew members had the right to defend themselves.
Robin Churchill, international law professor at the University of Dundee in Scotland, said there was no legal basis for boarding the ships as they were in international waters.  Ove Bring, Swedish international law professor, said that Israel had no right to take military action. That was supported by Mark Klamberg at Stockholm University. Canadian scholar Michael Byers notes that the event would only be legal if the Israeli boarding were necessary and proportionate for the country's self defence. Byers believes that "the action does not appear to have been necessary in that the threat was not imminent." Jason Alderwick, a maritime analyst at the International Institute for Strategic Studies of London, was quoted as saying that the Israeli raid did not appear to have been conducted lawfully under the convention. Anthony D'Amato, international law professor at Northwestern University School of Law, argued that the San Remo Manual on International Law Applicable to Armed Conflicts at Sea applies to a situation in which the laws of war between states are in force. He said the laws of war do not apply in the conflict between Israel and Hamas, which isn't even a state. He said the law of the Geneva Conventions would apply. Said Mahmoudi, an international law professor, said that boarding a ship on international waters, kill and capture civilians is not in line with the law.
A group of Israeli lawyers, including Avigdor Feldman, petitioned the Israeli High Court charging that Israel had violated the United Nations Convention on the Law of the Sea by capturing the boats in international waters. 
Turkey's foreign minister Ahmet Davutoğlu called the raid "a grave breach of international law and constituted banditry and piracy—it was “murder” conducted by a State, without justification". Prominent Turkish jurists have characterized Israel's actions as a violation of international law and a "war crime."
Turkey's deputy parliament speaker, Guldal Mumcu, said in a declaration that "[t]his attack was an open violation of United Nations rules and international law," and that "Turkey should seek justice against Israel through national and international legal authorities. The parliament expects the Turkish government to revise the political, military and economic relations with Israel, and to take effective measures."
Dr. Turgut Tarhanlı, dean of the Law department of İstanbul Bilgi University, cited the concept of innocent passage, under which vessels are granted safe passage through territorial waters in a manner which is not "prejudicial to the peace, good order or the security" of the state. He said that
the Convention on the Law of the Sea stipulates that a coastal state may consider intervention if a ship is engaged in arms and drug smuggling, the slave trade or terrorist activities. However, the case with the aid boats is totally different. They set sail in accordance with the Customs Act and are known to be carrying humanitarian aid, not weapons or ammunition. According to the Convention on the Law of the Sea, Israel was not entitled to launch a military operation against the boats and activists.
With regard to the Gaza–Jericho Agreement, Diana Buttu, a Palestinian-Canadian lawyer, professor, and former spokesperson with the Palestine Liberation Organization, said that Israel declared the Oslo Accords dead in 2001, and actually breached the agreements, so that a call to the applicability of the Gaza-Jericho Agreement is not plausible.
José María Ruiz Soroa, a Spanish expert in Admiralty law and co-author of the legal commentary "Manual de derecho de la navegación marítima", said that Israel is not entitled according to International Law to constrain the freedom of navigation of any ship on the high seas, except in a number of situations that do not apply to the Gaza flotilla case. Blockade is not a valid reason as it is a concept only applicable to war situations. He also mentioned that Israel's action is a breach of the UN International Maritime Organization Convention for the Suppression of Unlawful Acts Against the Safety of Maritime Navigation (SUA), which was signed by Israel in April 2009. According to the article 6.1 of the SUA, the jurisdiction over the offences that a ship might have committed lays in the State whose flag the ship is flying (in this situation, Turkey).