In this paper, we design a medium access control (MAC) layer prootocol for wireless body area networks (WBANs) to cope with inter-WBAN interference. Each WBAN consists of a coordinator and multiple sensor nodes. Interference happens when multiple nodes transmit to their coordinators at the same time. To avoid interference among WBANs, carrier sensing multiple access with collision avoidance (CSMA/CA) is implemented at the coordinator level; while for communications within each WBAN, the coordinator uses beacon messages to centrally arrange all the transmissions to avoid collisions. In the proposed protocol, the coordinator adaptively adjusts its frame length based on its perceived interference level. By doing so, a WBAN can enjoy a high throughput under a light interference level, while giving other WBANs a fair share of channel access chance when the number of surrounding WBANs is large. We further design a sensing scheme to reduce the sensing power consumption for the sensor nodes and discuss how to extend the protocol for multi-channel and QoS support. Finally the simulation results verify the effectiveness of the proposed protocol.