# Bromination of but-3-en-1-ol in basic medium and Baldwin's rules

After formation of the bromocarbocation the alkoxide anion attacks the bromocarbocation which leads to ring formation and can proceed through two pathways

5 endo tet cyclization is disfavored but 4 exo tet cyclization is favored according to Baldwin's rules; however, the answer given in my text book is the 5 membered ring.

But your method may be wrong in the given question the product A was first formed and then a ring closure step was performed using $$\ce{KOH}$$ as shown below :
Let me also address something that may be a doubt ( It was mine ) i.e. why doesn't the oxygen atom attack the bromonium Ion in the first step ? this is because even if it will attack you will also form a acid $$\ce{HBr}$$ which will cause the cleavage in the cyclic ester we just formed returning us to the original reagent hence it doesn't attack.