The State Department granted permission yesterday to the mother of a hostage Marine to return to Iran in hopes of visiting her son.

A department spokesman said an execption to President Carter's ban on travel to Iran was granted to Barbara Timm on humanitarian grounds.

Timm, of Milwaukee, visited her son, Sgt. Kevin Hermening, at the U.S. Embassy in Tehran in April. She was the first relative of one of the 53 hostages permitted inside the embassy since it was seized Nov. 4.

Timm technically violated Carter's ban on travel to Iran but he said he would take no legal action against her.

While she was in Tehran, the aborted hostage rescue mission was launched. Eight American servicemen died when a transport plane and a helicopter collided in the Iranian desert. In its aftermath, the hostages were reported scattered to about eight Iranian cities. Hermening's current location is uncertain.

Timm has upset many Americans by writing to the Ayatollah Ruhollah Khomeini and apologizing for the rescue mission. She said she was speaking only as the mother of a hostage.

Carter's travel ban exempted reporters. Former attorney general Ramsey Clark violated the ban by attending an anti-American conference in Tehran earlier this month. The Justice Department is considering prosecuting him.

"Mrs. Timm was granted an exception under the rules of the tavel ban to go to Iran for humanitarian reasons," State Department spokesman David Nalle said.

After Timm and her husband, Kenneth, visited Tehran, relatives of other hostages sought to follow. Nalle said other applications are pending and each will be "considered on a case-by-case basis."

Timm was not available for comment.