(CNN) -- Javier-Angel Balboa scored a dramatic late goal for Equatorial Guinea on Saturday as they beat Libya 1-0 in the opening match of the Africa Cup of Nations.
The former Real Madrid striker struck three minutes from the end, latching onto to Daniel Ekedo's pass before firing past Libya's goalkeeper Samir Aboud.
The co-hosts (with neighboring Gabon) had the ball in the back of the Libyan net in the first half, but Ivan Bolado's 16th minute effort was adjudged offside by the referee.
Libya had chances to equalize, perhaps the best falling to Jamal Mohamed whose shot was parried away by Danilo.
Aboud produced a fine save from a Lawrence Doe free kick midway through the second half before Balboa scored late on to grab all three points.
The win also earned the team a $1 million bonus, which was promised by the son of long-standing president Teodoro Obiang Nguema shortly before the tournament got underway.
Defeat for Libya capped a miserable opening day after a Moammar Gadhafi-era green flag appeared on the tournament's official website.
Libyan officials complained requesting that it be replaced with the new black, red and green national flag representing the ruling National Transitional Council.
In Saturday's other Group A match Zambia beat Senegal 2-1.
Emmanuel Mayuka and Rainford Kalaba put Zambia 2-0 up within 20 minutes -- a lead they maintained until the 74th minute when Dame N'Doye pulled one back.
Despite concerted pressure Senegal failed to come up with an equalizer leaving Zambia to celebrate a famous win as the final whistle blew.
Their next match is against Libya, while Equatorial Guinea take on Senegal. Both matches will be played on January 25.