his naval superiority wrested from the greeks the command of a great deal of the sea, on which the fate of the insurrection ultimately depended, while on land the greek irregular bands, having largely soundly beaten the porte's troops, had finally met a worthy foe in ibrahim's disciplined troops. the history of the events that led up to the battle of navarino and the liberation of greece is told elsewhere; the withdrawal of the egyptians from the morea was ultimately due to the action of admiral sir edward codrington, who early in august 1828 appeared before alexandria and induced the pasha, by no means sorry to have a reasonable excuse, by a threat of bombardment, to sign a convention undertaking to recall ibrahim and his army. but for the action of european powers, it is suspected by many that the ottoman empire might have defeated the greeks.