Round 1: Getting in
Tunisia
Algeria: a consular visa arranged in advance. A visa must be obtained before travel from the Algerian consular section in Lisbon; visas are not issued at the border, and arrivals without one are sent back. Tunisia: visa-free on a passport. A valid passport; no visa needed for stays up to 90 days. The visa decides it. Tunisia is passport-only for 90 days; Algeria requires a visa arranged through the consulate in Lisbon and turns back anyone who arrives without one.
Rule: Fewer hoops wins: ID card, then visa-free, then on-arrival permit, then e-visa, then consular visa.