Portugal brought back the rank of major-general in 1999 for the Army, Air Force, and the National Republican Guard. At that time it replaced the earlier title of brigadier when someone led a brigade, which is a large group of soldiers organized for action.
In the Portuguese Navy, the matching rank is called contra-almirante (rear admiral). Then in 2015 the ranks were shifted so that brigade commanders became brigadier-general, and major-general moved up one step. Long ago, the name sometimes acted more like a job title than a formal, permanent rank.