Industrial robots in poorly structured environments have to interact compliantly with this environment for successful operations. In this paper, we present a behaviour-based approach to learn peg-in-hole operations from scratch. The robot learns autonomously the initial mapping between contact states to motion commands employing fuzzy rules and creating an Acquired-Primitive Knowledge Base (ACQ-PKB), which is later used and refined on-line by a Fuzzy ARTMAP neural network-based controller. The effectiveness of the approach is tested comparing the compliant motion behaviour using the ACQ-PKB and a priori Given-Primitive Knowledge Base (GVN-PKB). Results using a KUKA KR15 industrial robot validate the approach.