Egypt's outgoing interim president enacted a law on Saturday making it illegal to desecrate the national flag or refuse to stand for the national anthem, his office said.
Those who break the new law will face up to one year in jail.
Signup to our newsletter and follow us on Facebook and Twitter!
The government drafted the law late last year amid heightened nationalistic fervour after the military toppled Islamist president Mohamed Morsi and unleashed a crackdown on his supporters.
Abdel Fattah al-Sisi, the former army chief who ousted Morsi, wan an overwhelming victory in last week's presidential election and is to take office next month.
The law, one of the last that will be enacted by outgoing interim president Adly Mansour, also stipulates a fine of up to 30,000 Egyptian pounds (about $4,300, 3,200 euros) for desecrating the flag or disrespecting the anthem, his office said in a statement.
Several Islamist members of Egypt's parliament, which was dissolved in 2012, had sparked outrage when they refused to stand for the national anthem. Some hardline Islamists reject displays of nationalism, which they view as a Western innovation.