The service said Tuesday the quake had a magnitude of 6.3 and was centered in the Molucca Sea about 135 kilometers northwest of Ternate .