WASHINGTON (AP) — Legislation to substantially overhaul the way music is licensed and songwriters compensated for songs online is being sent to the president's desk for his signature.

Congress cleared the bill Tuesday, giving final passage to a rare bipartisan accord between Republican and Democratic lawmakers. It enjoyed wide support in both the House and Senate, and within the music industry.

President Donald Trump is expected to sign it into law.

The Orrin B. Hatch Music Modernization Act, named after the retiring Utah senator, who is also a musician, creates a new independent entity that will license songs to companies that play music online.

The nonprofit collective will then pay songwriters, including those who wrote pre-1970s classics before music copyrights protected their work.