Among the migrants were a pregnant woman and a baby aged under one year old.
The group was crossing the sea in a makeshift boat in a bid to reach Greece.
Twenty of the refugees were Syrians and two were Afghan.
The rescue took place last night during a routine maritime patrol effort of which the Portuguese officers are part.