TOKYO - Japan and the U.S. have agreed in principle on guidelines for limiting immunity from Japanese prosecution for civilian workers at American military bases, following a murder case this year on a southern Japanese island involving a Marine-turned-contractor, officials said Monday.

Since July, the governments have been negotiating several points concerning U.S. civilian contractors at American bases who are subject to protection under the countries' Status of Forces Agreement.

Japanese Foreign Minister Fumio Kishida told a regular news conference that the two sides have agreed on how to define what constitutes a “civilian contractor” at an American base and hope to sign the agreement “during President Barack Obama's term.” He did not give further details.

The May arrest of the base contractor, accused of raping and murdering a 20-year-old woman, renewed outrage on Okinawa, where resentment has been simmering over the island's heavy U.S. troop presence.

That prompted Tokyo and Washington to try to establish a clearer definition of “civilian base workers.” In July, the two sides said base contractors, now described vaguely as having a “civilian component,” will be classified in more specific terms, to exclude from preferential treatment those without skills and those who are residents of Japan, like the suspect in the April murder case.

Kishida said a clear definition of civilian contractors and adequate control of their data would help prevent criminal cases in the future.

About 50,000 U.S. troops are stationed in Japan under a bilateral security agreement, more than half of them based on Okinawa. In addition, 7,000 Americans employed as civilian contractors were at U.S. military bases in Japan as of March.

The Status of Forces Agreement, originally signed in 1960, gives U.S. military personnel and civilians employed at American bases in Japan immunity from Japanese criminal procedures in accidents or crimes while on duty or on base.

It also allows the U.S. military to hold suspects on base until formal indictment by Japan. Okinawan authorities say the rule denies them proper access to investigate crimes under Japanese law.