* Rebels' tribe representative says end to blockade close
* Protest cost Libyan state billions in lost oil revenues
* Release of three captured rebels seen as aiding talks (Recasts with tribal leader, details, background)
By Feras Bosalum and Ulf Laessing
TRIPOLI, March 31 (Reuters) - Rebels in eastern Libya are close to reopening three oil ports they have occupied since the summer to press Tripoli for autonomy and a greater share of oil revenue, a leader from the rebels' tribe told state media on Monday.
The comments, the most optimistic for months, came after the government met a rebel demand to release three of their fighters who boarded a tanker loading oil at a rebel-held port in an attempt to get it to markets. They were captured when U.S. forces boarded the rogue ship and returned it to Tripoli.
The announcement will still be met with scepticism because the same tribal leader predicted in December that the heavily-armed rebel militia would end their blockade of the three ports which previously accounted for 600,000 barrels of oil a day.
"There are indications of an imminent breakthrough," Saleh Atawich, the top Magharba leader, said of talks with the government mediated by tribal elders, according to LANA state news agency. He gave no specific time frame.
Atawich is from the same tribe as port rebel leader Ibrahim Jathran but also close to government thinking. He had predicted that ports would reopen on Dec. 15, but a similar deal fell through at the last minute.
A local news channel operated by the federalist rebel leader also flashed an urgent news bulletin about a "breakthrough".
Three years after the fall of Muammar Gaddafi, the oil standoff is one of the major challenges to Libya's weak central government as the blockade drains state coffers, adding to Western worries the country is sliding deeper into instability.
With no real army, Libyan authorities are struggling to control militias and armed tribesmen who help oust Gaddafi in the 2011 civil war, but have become political players demanding power and oil wealth and controlling territory.
"There are careful efforts these days between the committees concerned with opening the ports and the parties that closed them," Atawich said. "The issue is moving in the direction according to plan."
Attawich could not be immediately reached on his cell phone for further details.
Hours earlier, Libya's attorney general ordered the release of three rebel fighters following comments by some lawmakers that this would help solve the port crisis, Sadiq al-Sour, head of the attorney's investigations department, told Reuters.
Sour said he regretted the release which had been made on political grounds. "These are people who committed crimes," he said. "Now justice is entering political conflicts."
Staff at state prosecutor's office later called on the attorney to resign over what they called an unjustified release, according to a statement posted on the office's official Facebook website.
Three weeks ago, the rebel militia embarrassed Tripoli by loading crude onto the "Morning Glory" tanker at the Es Sider port, which is under their control. U.S. special forces later stormed the ship in international waters and returned it to Libya.
Government and the parliament had told the militia to negotiate an end to their port blockade or face a military offensive. The rebels had demanded the release of their men, the tanker returned and the threat of an army offensive dropped before any talks.
Former anti-Gaddafi rebels and militias refuse to surrender their weapons and often use force or control of oil facilities to make demands on a state whose army is still in training with Western governments.
Those governments, which backed NATO air strikes to help the 2011 anti-Gaddafi revolt, are pressing the factions to reach a political settlement. But Libya has lurched from crisis to crisis over the last year.
Libya's oil production has fallen to a trickle due to the port seizures and protests at major oil fields. (Writing by Ulf Laessing, editing by David Evans and Patrick Markey)
Our Standards: The Thomson Reuters Trust Principles.