The girl later dropped charges against the Marine and he was released to the custody of US military authorities.
Speakers and participants at the rally hit out at some of the media and public reaction, which blamed the girl for being careless in letting the alleged assault take place.
"Crimes and accidents due to the bases have happened over and over"
Okinawa City mayor
One guest speaker, an Australian woman named only as Jane, defended the girl and spoke of her own experience of being raped by a US sailor in Yokosuka, a naval port city south of Tokyo, in 2002.
She said that although she "was already an adult when it happened" it was "very difficult to deal with" the police and court procedure.
"Don't you think it must be unbearable for such a small girl?" she asked the crowd.
Following last month's incident, the US military restricted soldiers and their relatives on Okinawa to the base for about two weeks, and imposed similar restrictions at two other bases in Japan.
But with other high-profile crimes being linked to servicemen feeling against the US troop presence remains high.
'Crimes and accidents'
Sunday's protest was one of the largest demonstrations against the US military in Okinawa since 1995, when three US servicemen were accused of gang-raping a 12-year-old, sparking efforts to reduce the number of Americans stationed on the island.
"Crimes and accidents due to the bases have happened over and over," the Japanese Kyodo news agency quoted Mitsuko Tomon, the Okinawa city mayor, as saying in his address to protesters.
"Okinawa has protested with intense anger to both the US and Japanese governments."
Participants in the rally called for revisions to the Status of Forces Agreement, which governs the status of US military personnel in Japan that would give Japanese authorities greater legal jurisdiction.
Both Tokyo and Washington have so far rejected demands to revise the pact.
Tokyo wants local residents to accept a plan to shift key functions of the US Marine's Futenma air station from Okinawa's city of Ginowan to the lightly populated coastal town of Nago.
Nago authorities have agreed to the move but many details are yet to be worked out. Relocating Futenma is key to a broader plan to shift some 8,000 of the 13,000 Marines now on Okinawa to the US territory of Guam.
Hirokazu Nakaima, Okinawa's governor and an ally of Japan's ruling Liberal Democratic Party, failed to appear at the rally, angering many protesters.
Sunday's rally also comes as the head of the US Navy in Japan pledged full support for a Japanese investigation into the killing of a taxi driver.
Japanese authorities have requested permission to question a US sailor whose credit card was found in a taxi in which the 61-year-old driver was stabbed to death with a kitchen knife, local media said.
The incident took place near Yokosuka base on the mouth of Tokyo Bay, the biggest US naval hub in the Pacific.
"I promise you all, I ensure to you all, our total support from the United States Navy," Rear Admiral James Kelly, the US navy chief in Japan, said.
On Saturday, the US military took the sailor into custody.