RIO DE JANEIRO, July 23 (Reuters) - Brazil’s main oil workers union is considering an open-ended strike in September if a 24-hour walkout scheduled for midnight Thursday fails to stop moves to shrink state-run oil company Petrobras, a senior union official said.

FUP, which represents platform, refinery and other workers, is fighting plans by Petroleo Brasileiro SA, as Petrobras is known, to sell $15.1 billion of assets by the end of 2016.

Petrobras wants to pay down debt, which at about $120 billion is the largest of any oil company, as well as generate cash for investment and revive investor confidence after a giant corruption scandal.

FUB also opposes a bill before Brazil’s Senate seeking to strip Petrobras of its right to all new development work in a giant offshore area known as Subsalt Polygon and end a requirement that Petrobras take a minimum 30 percent stake in exploration and production rights in the area.

“If our demands aren’t met, we are ready for an open-ended strike in September,” said Simão Zanardi, a member of the national directorate of FUP, Brazil’s largest federation of oil workers union. “We will not let them sell off what belongs to all Brazilians.”

FUP opposes any non-government involvement in Petrobras and wants the company, which has had non-government shareholders since the 1950s, totally nationalized.

While most Petrobras strikes have had little or no impact on production, FUP wants to revive the spirit of a 31-day strike in 1995.

That strike ended due to the government threatening mass lay-offs, but Zanardi believes it helped avert a privatization of Petrobras in 1997, when it was stripped of its monopoly on exploration, production and refining in Brazil.

Under Brazilian law, unions must cooperate in the safe operation or shutdown of dangerous facilities. The 24-hour strike will leave many union members on the job. Petrobras officials have said it would take five to 10 days for a strike to start having a significant impact on oil or fuel output.

While Petrobras remains controlled by the state, most of its shares are owned by non-government investors. It is one of the largest non-U.S. companies on the New York Stock Exchange.

“The company should not be used to guarantee the profits of investors,” FUP said in a statement on Thursday. “It should be a spring to drive social and economic development in Brazil.”

Petrobras officials did not immediately respond to requests for comment. (Reporting by Jeb Blount; Editing by Dan Grebler)