Libya was long considered a pariah state for sponsoring international terrorism , but it has been traveling a road of rehabilitation since 2003 , when Gaddafi 's government took responsibility for downing Pan Am Flight 103 and Flight 772 of the French airline UTA in the late 1980s and agreed to pay compensation to the victims ' families .