When you need to talk about someone doing something in the place of someone else, or on behalf or a country or organisation, you need to use por.

English: I can’t speak on behalf of my friends.

Español: No puedo hablar por mis amigos.

English: Marco can’t work today. I’m working for (on behalf of) him. 

Español: Marco no puede trabajar hoy. Trabajo por él.

English: He died for (on behalf of) his country.

Español: El murió por su país.