Citigroup Inc. is working with senators to hammer out legislation that would allow bankruptcy judges to modify individual mortgages, potentially helping customers avoid foreclosure, according to a report in The Wall Street Journal.

Citing unnamed sources close to Citi, the Journal said the financial services industry is reversing its previous opposition to so-called “cramdown” rules that force banks to accept modified mortgages from customers who have filed for bankruptcy protection.

Citi declined to comment on the Journal report.

Citi has been among the hardest hit banks by the ongoing mortgage and housing market turmoil. Analysts widely expect Citi to post a fifth straight quarterly loss when it reports fourth-quarter results.

The New York-based bank also received hundreds of billions of dollars in aid from the government late last year as investors worried about mounting mortgage and loan-related losses at Citi.

Hundreds of banks have received some form of assistance through a $700 billion government investment program and other government lending options as the credit markets have frozen and loan losses pile up. Congress is likely to place increased scrutiny about what banks are doing to help homeowners and consumers after having so heavily invested in supporting the sector through the current problems.

Legislation in both the House of Representatives and Senate was introduced on the first day of the new session Tuesday calling for the bankruptcy loan modification program. The Journal report says the legislation could be part of a broader $775 billion-economic stimulus package President-elect Barack Obama is pushing Congress to pass soon after he takes office Jan. 20.

Shares of Citi fell 5 cents to $7.10 in premarket trading.