Tarsal tunnel syndrome occurs when the posterior tibial nerve is compressed. This compression produces inflammation of the foot's fibrous canal (tarsal tunnel), which can result in acute ankle pain.