Eventually the Europeans entered the Middle East, specifically the Portuguese and then others, in the effort to control the Red Sea trade.
The power of the imamate declined in the 18th and 19th century.