Final Answer:
Bulgaria gained independence from the Ottoman Empire in the Treaty of Berlin in 1878 and became a republic in 1947.
Step-by-step explanation:
The Treaty of Berlin in 1878 marked a pivotal moment for Bulgaria, as it gained independence from Ottoman rule, establishing itself as a principality. However, it wasn't until 1908 that Bulgaria fully declared its independence and became a sovereign kingdom. After a series of political changes and the impact of World War II, Bulgaria abolished its monarchy in 1946 and officially became the People's Republic of Bulgaria in 1947. This transformation signaled the establishment of a socialist state under communist influence. The country later transitioned to a parliamentary republic in 1990, following the end of communist rule.
In summary, Bulgaria gained independence from the Ottoman Empire in 1878 and later became a republic in 1947.