TOKYO — Tens of thousands of people on the Japanese island of Okinawa gathered on Sunday to demand the removal of American military bases in what organizers said was the largest demonstration against the United States presence there in two decades.

The protest, in Naha, the capital of Okinawa Prefecture, was billed as a memorial for a 20-year-old woman who was found dead last month. A United States Marine veteran who was working as a civilian contractor on the island has been arrested in connection with the killing, prompting a public outcry.

Organizers said 65,000 people had attended the protest. That would make it the largest demonstration since 1995, when two American Marines and a Navy sailor were arrested over the rape of a 12-year-old girl, an episode that shook the tight military alliance between the United States and Japan and is still bitterly remembered by many Okinawans.

Separate estimates of the crowd’s size on Sunday from the police or the Japanese news media were not immediately available.

“Vicious crimes cannot be tolerated,” the governor of Okinawa, Takeshi Onaga, was quoted by the Japanese news media as saying during a speech at the rally. Mr. Onaga wants the United States military footprint reduced, a position that Japanese newspaper opinion surveys and recent election results indicate is shared by an increasing number of residents.

About 1.4 million people live on Okinawa. Among them are roughly 50,000 Americans, the majority connected to the military.

With just a sliver of Japan’s total landmass, Okinawa is home to about half the American soldiers and sailors stationed in Japan. About three-quarters of the acreage in Japan taken up by United States bases is on the island, a share that Mr. Onaga and his supporters say is unfairly large.

American forces on Okinawa are under a 30-day curfew, billed by their commanders as a “mourning period,” in response to the recent killing. They are prohibited from drinking in public and must be back on their bases or at home at night.

The Navy imposed a separate, stricter drinking ban on all its personnel in Japan this month, after a sailor who was thought to have been drinking was arrested on Okinawa over a car accident that injured two Japanese civilians.

Resentment against the United States presence has been on the rise in Okinawa, driven by concerns over crime and by an unpopular plan to build a new Marine Corps airfield in the northern part of the island. In local elections this month, voters gave an expanded majority in the Okinawa Prefectural Assembly to politicians who oppose the airfield and want to reduce the American military presence.

Defenders of the military point to statistics that show American soldiers and sailors in Okinawa are charged with crimes by the Japanese authorities at lower rates than locals. The numbers are difficult to weigh, however, because United States personnel spend only part of their time under Japanese legal jurisdiction. Their bases are, in effect, American territory.

Mr. Onaga has been seeking to forge a broad political coalition to reduce the United States presence. But he is opposed by the national government in Tokyo, led by Prime Minister Shinzo Abe, a conservative who has been working to strengthen ties with Washington.

Mr. Abe argues that any perceived weakening of the alliance would only embolden Japan’s regional rival, China.

Mr. Onaga hails from the same political party as Mr. Abe, the Liberal Democratic Party, but broke with it over the base issue. The party’s Okinawan wing has been more sympathetic to the governor, but it declined to endorse the protest on Sunday, leaving organizers dependent on a more traditional anti-base coalition of communists and socialists.