An injury-time goal from Libya striker Elmutasem Abushnaf ended Rwanda's hopes of reaching the quarterfinals of the African Nations Championships (CHAN) for the second time in a row.
Amavubi, who just needed a draw to reach the next stage of the continental tournament, spent most of the time defending deep in their own half, before falling 1-0 to the North Africans at Grand Stade de Tanger in Morocco on Tuesday night.
Rwanda had zero shot on target.
Head coach Antoine Hey started with Dominique Savio Nshuti upfront, replacing him with forward Bernabe Mubumbyi in the second half.
Hey also introduced Fitina Ombalenga for Eric Iradukunda, and Amran Nshimiyimana, who replaced Djabel Manishimwe.
In the opening minutes, the Amavubi won a free-kick from a promising position but delivery was poor.
Late on in the game, full-back Eric Rutanga came close to putting the Amavubi ahead but his effort hit the side-netting.
Libya looked dangerous all through but were unlucky in front of goal on several occasions, until practically the last kick of the ball.
In the other Group C tie, Nigeria beat Equatorial Guinea 3-1, with Secundino Eyama Nsi opening the scoring for Equatorial Guinea in the 40th minute before Anthony Okpotu, Ojo Solomon and Rabiu Ali scored for Nigeria in the 58th, 69th and 83rd minutes.
The results saw Nigeria qualify for the last eight, finishing at the top of Group C with 7 points, while Libya also progressed to the quarterfinals in second place with 6 points.
Rwanda were eliminated with 4 points while Equatorial Guinea go home with no point.
In the earlier matches, Rwanda had drawn 0-0 against Nigeria and beaten Equatorial Guinea 1-0.
Rwanda 0 - 1 Libya
Eq. Guinea 1 - 3 Nigeria