The flag of Portugal was modified in the year 1577 , during the reign of Sebastian .
In 1578 , during the reign of Sebastian and on the eve of the fatal Battle of Alcácer Quibir , the flag was again modified .
Flag of Portugal