This study aims This study aims to determine and analyze the role of the Maritime Security Agency in maintaining maritime security of the Republic of Indonesia based on Law Number 32 of 2014 concerning Maritime Affairs. This legal research is included in normative legal research, which is perspective by using sources of legal materials, both primary and secondary legal materials. The legal material collection technique used is by means of library research in the form of books, regulations, and other research documents as well as for supporting legal materials conducted interviews with the Sea Security Agency. The technical analysis of legal materials used by the writer is deduction technique based on deductive reasoning methods. Based on the results of research and discussion, it can be concluded that Bakamla as a marine security institution replaces the function of the sea security coordination agency which is still considered ineffective. Bakamla has duties in security and safety patrols in the territorial waters and jurisdictions with the authority of one of them in the form of instant pursuit, stopping, capturing and inspecting ships to be handed over to the relevant ministries and agencies. To carry out these duties and authorities, a legal action unit was formed which is representative of ministries and institutions that have authority in the field of law enforcement at sea. But there are still some obstacles in the exercise of authority both in terms of facilities and infrastructure and there are overlaps with several other institutions that are also authorized to enforce law at sea.